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 | |
# Adapted from the book "Nginx HTTP Server", by Clement Nedelcu. | |
# Original Author: Ryuan Norbauer http://norbauerinc.com | |
# Modified: Geoffrey Grosenbach http://topfunky.com | |
# Modified: Clement Nedelcu http://cnedelcu.blogspot.com/ | |
# Modified: Jordan Orelli http://jordanorelli.com/ | |
# source: https://gist.github.com/1161075 | |
# Corresponds with the following compile-time options: |
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
require 'nokogiri' | |
require 'open-uri' | |
require 'terminal-notifier' | |
title = 'Bitcoin Gem' | |
activate = 'com.googlecode.iterm2' | |
current_price = 0 | |
while 1 |
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
//you will need to install node.js and restler first | |
//npm install restler | |
//run with the following command | |
// node buy.js | |
var sys = require('util'), | |
rest = require('restler'); | |
//set these to your coinbase API key, the amount you want to buy & the price that you're expecting for |
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
def self.circle_path(center, radius, complete_path = false) | |
# For increased accuracy, if your data is in a localized area, add the elevation in meters to r_e below: | |
r_e = 6378137.0 | |
@@d2r ||= Math::PI/180 | |
@@multipliers ||= begin | |
segments = 16 | |
dRad = 2*Math::PI/segments | |
(segments + (complete_path ? 1 : 0)).times.map do |i| | |
rads = dRad*i | |
y = Math.sin(rads) |
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 | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
curl -L https://get.rvm.io | bash | |
source /etc/profile.d/rvm.sh | |
rvm requirements | |
rvm install 2.0.0 | |
source /etc/profile.d/rvm.sh | |
gem install chef ruby-shadow --no-ri --no-rdoc |