This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew options ffmpeg | |
brew install ffmpeg \ | |
--with-chromaprint \ | |
--with-fdk-aac \ | |
--with-fontconfig \ | |
--with-freetype \ | |
--with-frei0r \ | |
--with-game-music-emu \ | |
--with-libass \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Setup a Root CA in vault | |
# Generate and sign an Intermediate cert | |
# | |
# Requires: | |
# * A running vault server already initialzed and unsealed | |
# * Environment variable VAULT_TOKEN is set | |
# * vault cli (https://www.vaultproject.io) | |
# * httpie (https://github.com/jkbrzt/httpie) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>MicrosoftRDC</appname> | |
<equal>com.microsoft.rdc.mac</equal> | |
</appdef> | |
<symbol_map type="KeyCode" name="RDC_VK_HOME" value="0x73"/> | |
<symbol_map type="KeyCode" name="RDC_VK_END" value="0x77"/> | |
<item> | |
<name>Microsoft Remote Desktop App v8.0.14+</name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pulled from http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ | |
# expanded via http://superuser.com/questions/690060/how-to-enable-network-with-a-raspberry-pi-emulated-on-qemu | |
# tested with 2015-02-16-raspbian-wheezy.zip on OSX Mavericks | |
# OSX terminal | |
brew install qemu | |
# kernel-qemu is a linux kernel compiled with ARM1176 support. | |
# learn more here: http://xecdesign.com/compiling-a-kernel/ | |
curl -OL http://xecdesign.com/downloads/linux-qemu/kernel-qemu | |
curl -o raspbian_latest.zip -L http://downloads.raspberrypi.org/raspbian_latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# mass deskew scanned files via command line | |
# - requires: ImageMagick and Deskew Tool | |
# - see http://galfar.vevb.net/wp/tag/deskew | |
for d in "$@"; do | |
file=`basename "$d" .pdf` | |
cd "`dirname "$d"`" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
parse_yaml() { | |
local prefix=$2 | |
local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') | |
sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ | |
-e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | | |
awk -F$fs '{ | |
indent = length($1)/2; | |
vname[indent] = $2; | |
for (i in vname) {if (i > indent) {delete vname[i]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### pip install pycrypto | |
import base64 | |
from Crypto.Cipher import AES | |
from Crypto import Random | |
import datetime | |
import hashlib | |
import hmac | |
import json | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Camys-MacBook-Pro:clipboard camy$ sudo pip install pyobjc | |
Downloading/unpacking pyobjc | |
Running setup.py egg_info for package pyobjc | |
Downloading/unpacking pyobjc-core==2.5.1 (from pyobjc) | |
Running setup.py egg_info for package pyobjc-core | |
warning: no directories found matching 'Scripts' | |
warning: no directories found matching 'setup-lib' | |
warning: no directories found matching 'source-deps' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Find files recursively using given file extensions and run given command on random 'n' files: | |
* python randomrun.py -e mkv,avi,ogm -r vlc -c 4 /some/dir/ # run 4 random moves using vlc | |
* python randomrun.py -e txt,dat -r cat -c 3 -p /some/dir/ # run cat on 3 random files parallelly | |
""" | |
import argparse |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import time | |
import boto | |
import boto.manage.cmdshell | |
def launch_instance(ami='ami-7341831a', | |
instance_type='t1.micro', | |
key_name='paws', | |
key_extension='.pem', | |
key_dir='~/.ssh', |
NewerOlder