Appropriated from dergachev
This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
| # visit https://accounts.google.com/DisplayUnlockCaptcha and click to allow access | |
| # edit /etc/monit/monitrc to include the following | |
| set mailserver smtp.gmail.com port 587 | |
| username "whoever@gmail.com" password "whatever" | |
| using tlsv1 | |
| with timeout 30 seconds | |
| # run the following to validate access |
| (function(){ | |
| // To see the elements with the highest z-index on a page | |
| var highestZindex = 0; | |
| var forEach = function (array, callback, scope) { | |
| for (var i = 0; i < array.length; i++) { | |
| callback.call(scope, i, array[i]); | |
| } | |
| }; |
| // To see all elements and their z-index on a page | |
| (function(){ | |
| // To see all elements and their z-index on a page | |
| var forEach = function (array, callback, scope) { | |
| for (var i = 0; i < array.length; i++) { | |
| callback.call(scope, i, array[i]); | |
| } | |
| }; | |
| forEach(document.querySelectorAll('*'), function (index, element) { |
| # Before running this script, ensure that you've exported your API key: | |
| # export DO_API_TOKEN=YOUR DIGITAL OCEAN API TOKEN | |
| endpoints=(sizes regions images account/keys) | |
| for i in "${endpoints[@]}"; do | |
| header=`printf "Authorization: Bearer %s" $DO_API_TOKEN` | |
| url=`printf "https://api.digitalocean.com/v2/%s" $i` | |
| curl -X GET -H 'Content-Type: application/json' -H "$header" "$url" | python -mjson.tool | |
| done |
| ################################################################################ | |
| # Once the following has been added to the .gitconfig and .extra, we can view | |
| # all our git aliases by either using | |
| # | |
| # gla # List git aliases without comments | |
| # | |
| # galias # List git aliases with comments | |
| # | |
| # Refer to the following for more information: | |
| # https://gist.github.com/mwhite/6887990 |
| // Requires jQuery. | |
| // Return every classname in the current document, one per line | |
| // (i.e. splitting multiple classnames where they appear) | |
| $('*').each( | |
| function(i, e) { | |
| var classNames = e.className.split(/\s+/); | |
| classNames.map(function(className){ | |
| console.log(className); | |
| }); | |
| } |
Appropriated from dergachev
This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
| We prefer to point to our WAMP PHP CLI as our system-wide PHP CLI version, and we do this by | |
| including the following script at /usr/local/bin/php: | |
| #!/bin/bash | |
| # e.g. php="/cygdrive/c/Program Files (x86)/php/php.exe" | |
| php="/cygdrive/c/wamp/bin/php/current/php.exe" | |
| for ((n=1; n <= $#; n++)); do | |
| if [ -e "${!n}" ]; then |
| Windows Registry Editor Version 5.00 | |
| [HKEY_CLASSES_ROOT\Directory\shell\powershell] | |
| @="Open Powershell here" | |
| [HKEY_CLASSES_ROOT\Directory\shell\powershell\command] | |
| @="C:\\\\WINDOWS\\\\system32\\\\cmd.exe /c start powershell -NoExit -Command Set-Location -LiteralPath '%L'" | |
| # setup our remotes | |
| git remote add all git@myrepo:pathtorepo | |
| git remote set-url all --add git@bitbucket.org:me/myrepo | |
| git remote set-url all --add git@github.com:me/myrepo | |
| git remote set-url all --add https://gitlab.cwp.govt.nz/pathtorepo | |
| # do work | |
| git add . | |
| git commit -m "Commiting work" | |