Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <!-- Launch Daemon do not always have access to all the path variables | |
| As a results, scripts will sometimes fail if the you are using path variables inside them | |
| To enable the script to have access to all path variables, open up a terminal and type in --> | |
| <!-- echo $PATH --> | |
| <!-- You can opt to filter out some of the path variables which are not required by script--> | |
| <key>EnvironmentVariables</key> |
| #Gets screen capture of device every 270 seconds and outputs screencap to timestamped png file in local directory | |
| while true; do adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > ScreenCap.`date +%Y`.`date +%m`.`date +%d`-`date +%H`.`date +%M`.`date +%S`.png; sleep 270; done | |
| #Gets logs from device and outputs them to a timestamped file in local directory | |
| while true; do adb logcat -v time > logging`date +%Y`.`date +%m`.`date +%d`-`date +%H`.`date +%M`.`date +%S`.txt; done | |
| #Gets PID of <packagename> | |
| adb shell ps | grep <packagename> | |
| #Outputs battery level to console |
| #!/bin/bash -eu | |
| # | |
| # Config. | |
| # | |
| # Arg 1: file to install on the Android OTT STB, which must be connected, and | |
| # mounted read/write as root. See connect-remount-as-root.sh | |
| apkpath=${1:-''} |
| # GIT heart FZF | |
| # ------------- | |
| is_in_git_repo() { | |
| git rev-parse HEAD > /dev/null 2>&1 | |
| } | |
| fzf-down() { | |
| fzf --height 50% "$@" --border | |
| } |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.
Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.
— C.A.R. Hoare, The 1980 ACM Turing Award Lecture
For Chrome Canary:
alias hydra='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --no-sandbox --js-flags="--user-data-dir=/tmp/profile --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces"'For regular ol' Chrome: