<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>localhost.pbcopy</string>
This file contains hidden or 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 | |
import json, sys | |
def toPigLatin(string): | |
modifiedWords = [] | |
for word in string.lower().split(): | |
if word[0] in ['a', 'e', 'i', 'o', 'u']: | |
word += 'ay' | |
else: |
This file contains hidden or 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
require 'json' # gem install json | |
data = JSON.parse File.read ARGV.shift | |
data.each do |key, value| | |
puts key | |
puts value | |
end |
This file contains hidden or 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 multiprocessing | |
def euler1(val): | |
q = sum([i for i in range(val) if (i % 3 == 0 or i % 5 == 0)]) | |
return q | |
def store(val): | |
res.append(val) | |
def runParallel(fn, argTuples, callbackFn, numWorkers = 4): |
This file contains hidden or 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
cat .ssh/id_rsa.pub # get your public key, and copy it | |
# log in to the server to which you'd like to login with your ssh key | |
vim .ssh/authorized_keys # copy your public key here | |
# make the file yours so that nobody can use it and login using your credentials | |
chmod 644 .ssh/authorized_keys | |
chown user:group .ssh/authorized_keys | |
# win! |
This file contains hidden or 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" 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>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.30196079611778259</real> | |
<key>Green Component</key> | |
<real>0.30196079611778259</real> |
This file contains hidden or 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
# Use perl instead of sed, due to differences between OS X sed and gnu sed. | |
# This will work on both Linux and Unix as long as perl is installed. | |
find . -type f -exec perl -pi -e 's/OLDSTRING/NEWSTRING/g' {} \; |
This file contains hidden or 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 code | |
# at the place where you'd want to debug | |
code.interact(local=dict(globals(), **locals())) |
This file contains hidden or 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 | |
#exit on error | |
set -e | |
# create our directories | |
mkdir -p $HOME/local $HOME/src | |
############ | |
# libevent # | |
############ |
This file contains hidden or 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
FROM ubuntu:16.04 | |
# Locales | |
ENV LANGUAGE=en_US.UTF-8 | |
ENV LANG=en_US.UTF-8 | |
RUN apt-get update && apt-get install -y locales && locale-gen en_US.UTF-8 | |
# Colors and italics for tmux | |
COPY xterm-256color-italic.terminfo /root | |
RUN tic /root/xterm-256color-italic.terminfo |
OlderNewer