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
hybrid_data_regular <- structure(list(sample = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
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 csv | |
import glob | |
import plistlib | |
clientProject = 'My Project' | |
for filename in glob.glob("*.bex"): | |
root = plistlib.readPlist(filename) | |
with open(filename+'.csv', 'wb') as out: | |
out = csv.writer(out, delimiter='|') | |
out.writerow(['Slip', 'Start', 'End', 'Duration (minutes)']) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/** | |
* <p> | |
* This is a one-file logger that can be used to get you started quickly. You | |
* can send it any array of objects that it will print to stdout/stderr. | |
* Reflection is used to print the class/line/method. QuickLogger is pretty darn | |
* slow, so don't use it in production. | |
* </p> | |
* <p> | |
* All methods are static, and you can (if your IDE supports it, which most do) | |
* use static imports to make your life even easier |
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 json | |
import time | |
import importlib | |
import sys | |
import glob | |
# From http://stackoverflow.com/a/5478448/119592 | |
def timing(f): | |
def wrap(*args): |
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 | |
set -e | |
domain=mislav.net | |
record=511770 # mysubdomain.mislav.net | |
ip="$( curl -s icanhazip.com )" | |
payload="{ \"record\": { \"content\": \"${ip}\" } }" | |
curl -fsS --netrc \ |
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 | |
DOMAIN_ID="yourdomain.com" | |
RECORD_ID="9348341" | |
DOMAIN_TOKEN="8339c723c223445f6c876bca3fafffd3345" | |
IP="`curl http://ipv4.icanhazip.com/`" | |
JSON="{\"record\":{\"content\":\"$IP\"}}" | |
curl -H "X-DNSimple-Domain-Token: $DOMAIN_TOKEN" \ | |
-H "Accept: application/json" \ |
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
#include <stdio.h> | |
#include <unistd.h> | |
int main() | |
{ | |
/* fork a child process */ | |
fork(); | |
/* fork another child process */ | |
fork(); | |
/* and fork another */ |
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
# Pdock rapidly sets up a tiny platform for you automatically discover and | |
# serve your docker services. It uses the hipache and skydock projects | |
# to enable rapidly connecting to your containers via subdomain names. | |
# Only port 80 has to be opened, and UDP,TCP,HTTP,WebSocket should | |
# work (mostly) out of the box | |
# | |
# Copyright 2014 Hamilton Turner <[email protected]> | |
# | |
# | |
# Examples: |
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
hamiltont$ brew ls pygtk -v | |
/usr/local/Cellar/pygtk/2.24.0/AUTHORS | |
/usr/local/Cellar/pygtk/2.24.0/bin/pygtk-codegen-2.0 | |
/usr/local/Cellar/pygtk/2.24.0/bin/pygtk-demo | |
/usr/local/Cellar/pygtk/2.24.0/ChangeLog | |
/usr/local/Cellar/pygtk/2.24.0/COPYING | |
/usr/local/Cellar/pygtk/2.24.0/include/pygtk-2.0/pygtk/pygtk.h | |
/usr/local/Cellar/pygtk/2.24.0/INSTALL_RECEIPT.json | |
/usr/local/Cellar/pygtk/2.24.0/lib/pkgconfig/pygtk-2.0.pc | |
/usr/local/Cellar/pygtk/2.24.0/lib/pygtk/2.0/demos/__init__.py |
OlderNewer