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 | |
for i in *.7z; do | |
subdirectory_name=$(echo $i | sed 's/.7z//'); | |
7z x "$i" -o"$subdirectory_name" | |
done |
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
# Couple notes here: | |
# 0) Apple might change their APIs. If they do, this won't work any more. | |
# 1) If you want a different model iPhone, you'll have to do some sleuthing on apple.com "check availability" network requests to figure out what to look for. | |
import requests | |
import twilio | |
import sys | |
import time | |
import twilio.rest |
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
{ | |
"title": "btc-box", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "plugin:\"load\"", | |
"alias": "Load", | |
"color": "#7EB26D", | |
"id": 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
// Run on Agent | |
// Thresholds to adjust for better accuracy | |
dataThreshold <- 300; // Minimum accelerometer value to count as ON | |
onThreshold <- 24; // Number of ON samples before machine enters RUNNING state | |
offThreshold <- 60; // Number of OFF samples before machine enters OFF state | |
// State variable | |
running <- false; |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/-(git\/ \1 )/' | |
} | |
# set a fancy prompt (non-color, unless we know we "want" color) | |
case "$TERM" in | |
xterm-color) color_prompt=yes;; | |
esac | |
force_color_prompt=yes |
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
# /etc/init/APP.com.conf | |
description "APP.com" | |
start on runlevel [2345] | |
stop on runlevel [016] | |
# Restart when job dies | |
respawn |
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 bash | |
# Ensure things are up to date | |
apt-get -y update | |
apt-get -y upgrade | |
# Setup a build environment | |
apt-get install build-essential | |
apt-get install -y zlib1g-dev libssl-dev lib64readline-gplv2-dev libyaml-dev |
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
# Generate documentation whenever a file is changed | |
guard 'rocco', :dir => 'docs', :stylesheet => 'http://jashkenas.github.com/docco/resources/docco.css' do | |
watch(%r{^app/.*\.(js)$}) | |
end |
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
// Create a new instance of the Rooms collections | |
FireDrop.Rooms = new FireDrop.collections.Rooms(); | |
// Fetch the initial data from Firebase | |
FireDrop.Rooms.fetch({ success: function (response) { | |
// Keep this collection in sync with Firebase. | |
// You could save this as a property on the collection for later access. | |
new BackboneFirebase(FireDrop.Rooms); |