Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');| <?xml version="1.0"?> | |
| <root> | |
| <devicevendordef> | |
| <vendorname>APPLE_INC</vendorname> | |
| <vendorid>0x05ac</vendorid> | |
| </devicevendordef> | |
| <devicevendordef> | |
| <vendorname>FILCO</vendorname> | |
| <vendorid>0x04d9</vendorid> | 
| <?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> | |
| <key>PayloadContent</key> | |
| <array> | |
| <dict> | |
| <key>IKEv2</key> | |
| <dict> | |
| <key>AuthName</key> | 
| // modify/duplicate the other snippets in this group, using | |
| // the abbreviation to define words to replace with "swear" characters | |
| function censor (input) { | |
| var badWord = input.replace(/((er)?s?|ing)?$/, ''); | |
| return input.replace(badWord, censored(badWord)); | |
| } | |
| function shuffleArray(inputArr) { | |
| var array = inputArr.slice(0); | 
| tell application "Finder" | |
| set theFiles to the selection | |
| repeat with thisFile in theFiles | |
| try | |
| (* get path and filename information from UNIX *) | |
| set theExtension to the name extension of thisFile | |
| set thePath to the POSIX path of (folder of thisFile as string) | |
| set theFilename to the POSIX path of (thisFile as string) | |
| set theBaseName to (do shell script "/bin/bash -c \"basename " & theFilename & " ." & theExtension & "\"") | |
| set theURLEncodedFilename to (do shell script "/usr/bin/python -c 'import sys, urllib; print urllib.quote(sys.argv[1])' " & quoted form of theFilename) | 
| <?xml version="1.0"?> | |
| <root> | |
| <item> | |
| <name>My Custom Keys</name> | |
| <!-- Caps Lock = Hyper is setup via Seil --> | |
| <item> | |
| <name>F19 to F19</name> | |
| <appendix>F19 to Hyper (ctrl+shift+cmd+opt)</appendix> | |
| <appendix>(+ F19 Only, send escape)</appendix> | |
| <identifier>private.f19-to-f19-and-escape</identifier> | 
| # found on the net, here to remember the exact command | |
| brew install gifsicle | |
| ffmpeg -i input_file -vf "scale=min(iw\,600):-1" -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=7 --colors 256 > outfile.gif | 
| #!/usr/bin/ruby | |
| # encoding: utf-8 | |
| # Grab google web fonts and embed them as base64 data URIs | |
| # <http://brettterpstra.com/2015/03/14/embedding-google-web-fonts/> | |
| require 'base64' | |
| if ARGV.length > 0 | |
| input = ARGV | |
| elsif STDIN.stat.size > 0 | |
| input = STDIN.read.strip.split(/\n+/) | 
| #!/bin/bash | |
| # | |
| # see https://stribika.github.io/2015/01/04/secure-secure-shell.html | |
| SSHD_VERSION=`/usr/sbin/sshd -v 2>&1 | grep OpenSSH | cut -d " " -f1 | cut -d "_" -f2 | cut -d"." -f2 | cut -d"p" -f1` | |
| cat /etc/ssh/sshd_config | grep -v "KexAlgorithms" | grep -v "Ciphers" | grep -v "MACs" | grep -v "github.com" > /etc/ssh/sshd_config.new | |
| cat /etc/ssh/ssh_config | grep -v "KexAlgorithms" | grep -v "Ciphers" | grep -v "MACs" | grep -v "github.com" > /etc/ssh/ssh_config.new | |
| if [ "${SSHD_VERSION}" != "0" ]; then | |
| # better algorithms only available on newer OpenSSH versions | |
| echo "KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256" >> /etc/ssh/sshd_config.new | 
| ffmpeg -i in.mov -s 640x360 -pix_fmt rgb24 -r 10 -f gif - | gifsicle --optimize=3 --delay=6 > out.gif |