Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 5, 2024
2 parents f4652aa + 765f9c6 commit 5c2d82b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 21 deletions.
3 changes: 2 additions & 1 deletion brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ brew install ffmpeg
# json stuff
brew install jq gron

brew install ncdu # find where your diskspace went
# brew install ncdu # find where your diskspace went
brew install gdu # available as gdu-go. faster than ncdu on SSD's.


brew install scrcpy # control/view android phone from PC. amazing
Expand Down
7 changes: 3 additions & 4 deletions fish/aliases.fish
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ alias master="main"
alias ag='command ag -W (math $COLUMNS - 14)'

# fd is fast but their multicore stuff is dumb and slow and bad. https://github.com/sharkdp/fd/issues/1203
alias fd='command fd -j1 --exclude node_modules'
# alias fd='command fd -j1 --exclude node_modules'
# By default watchexec thinks the project origin is higher up. So dumb.
alias watchexec='command watchexec --project-origin . --ignore node_modules'

Expand Down Expand Up @@ -176,9 +176,8 @@ alias reportunit 'yarn jest (find report -iname "*-test.js" | grep -v axe)'
alias reportwatch 'watchexec "node build/build-report-components.js && node build/build-report.js --psi && node build/build-sample-reports.js && echo \$(date) && yarn eslint --fix report/renderer/components.js" && bash core/scripts/copy-util-commonjs.sh'

# dt. rpp
# in the future this will be: yarn test front_end/panels/timeline/ front_end/models/trace front_end/services/annotations_manager front_end/ui/legacy/components/perf_ui
alias rppunit 'npm run unittest -- --expanded-reporting --mocha-fgrep=Processor\|Timeline\|trace\|Trace\|Appender\|Handler\|Performance\|Annotation\|Flame'
alias rppinter 'npm run interactionstest -- --test-file-pattern="*/performance/**"'
alias rppunit 'npm test -- front_end/panels/timeline/ front_end/models/trace front_end/ui/legacy/components/perf_ui'
alias rppinter 'npm run test -- test/e2e/performance/'
alias rppscreen 'third_party/node/node.py --output scripts/test/run_test_suite.js --config test/interactions/test-runner-config.json --mocha-fgrep "[screenshot]" --test-file-pattern="*/performance/**"'

abbr xpraclient "xpra attach --video-scaling=off --desktop-scaling=off --dpi=96 --ssh=/usr/bin/ssh 'ssh://glurp/:110'"
Expand Down
27 changes: 27 additions & 0 deletions fish/chromium.fish
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,33 @@ function dtcr --description "run chrome with dev devtools"
eval $cmd
end



function dtcrcanary --description "run chrome canary with dev devtools"

# function handle_int --on-signal SIGINT
# echo Got SIGINT
# end

set -l cdup (git rev-parse --show-cdup)
set -l crpath "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
set -l dtpath (realpath out/Default/gen/front_end)
if test ! -e "$dtpath/devtools_app.html"
echo "Not found at: $dtpath/devtools_app.html"
set dtpath (realpath out/Default/gen)
end
if test ! -e "$dtpath/devtools_app.html" # elsa?
echo "Not found at: $dtpath/devtools_app.html ... \nBailing"; return 1
end

# A lil landing page that gives me the local loadTimelineFromURL url to load directly (as we can't have chrome open it (or navigate to it))
# set -l landing_url "data:text/html;charset=utf-8,<p>hi.<p><textarea cols=100>devtools://devtools/bundled/devtools_app.html?loadTimelineFromURL=http://localhost:9435/ikea-latencyinfoflow.json</textarea><p><textarea cols=100>devtools://devtools/bundled/devtools_app.html</textarea>"
# used to use component-server --traces but nah.. http://localhost:11010/
set -l cmd "$crpath --custom-devtools-frontend=file://$dtpath --user-data-dir=$HOME/chromium-devtools/dt-chrome-profile $clutch_chrome_flags $argv "
echo " > $cmd"
eval $cmd
end

function dtbcr --description "build chromium, then open it"
if dtb
dtcr
Expand Down
16 changes: 0 additions & 16 deletions fish/functions.fish
Original file line number Diff line number Diff line change
Expand Up @@ -126,21 +126,6 @@ function shellswitch
chsh -s (brew --prefix)/bin/$argv
end

function upgradeyarn
curl -o- -L https://yarnpkg.com/install.sh | bash
end

function fuck -d 'Correct your previous console command'
set -l exit_code $status
set -l eval_script (mktemp 2>/dev/null ; or mktemp -t 'thefuck')
set -l fucked_up_commandd $history[1]
thefuck $fucked_up_commandd > $eval_script
. $eval_script
rm $eval_script
if test $exit_code -ne 0
history --delete $fucked_up_commandd
end
end

# requires my excellent `npm install -g statikk`
function server -d 'Start a HTTP server in the current dir, optionally specifying the port'
Expand All @@ -160,7 +145,6 @@ function server -d 'Start a HTTP server in the current dir, optionally specifyin
end



function conda -d 'lazy initialize conda'
functions --erase conda
eval /opt/miniconda3/bin/conda "shell.fish" "hook" | source
Expand Down

0 comments on commit 5c2d82b

Please sign in to comment.