Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View FernandoEscher's full-sized avatar
🏠
Working from home

Fernando Irias Escher FernandoEscher

🏠
Working from home
  • Tegucigalpa, Honduras
View GitHub Profile
#!/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
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)
@FernandoEscher
FernandoEscher / buy.js
Last active November 28, 2017 12:54 — forked from chenosaurus/buy.js
//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
require 'nokogiri'
require 'open-uri'
require 'terminal-notifier'
title = 'Bitcoin Gem'
activate = 'com.googlecode.iterm2'
current_price = 0
while 1
@FernandoEscher
FernandoEscher / nginx
Created June 25, 2012 21:56 — forked from jordanorelli/nginx
nginx init.d script
#!/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: