Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am seeingidog on github.
  • I am seeingidog (https://keybase.io/seeingidog) on keybase.
  • I have a public key ASAvHjfWQup-BFicm8a6Zj61MfXIYgRVyC79HJDLgprG0Qo

To claim this, I am signing this object:

View gist:1420140
<head>
<meta content='initial-scale=1.0' name='viewport' user-scalable='no' />
<style type='text/css'>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
<div id='map_canvas'>{ height: 100% }</div>
</style>
<script src='http://maps.googleapis.com/maps/api/js?key=AIzaSyDxmdqtZTyPfqktKg8aKsR-9PyVpK3YNXs&amp;sensor=false' type='text/javascript'></script>
<script type='text/javascript'>
View gist:1420076
flightPlanCoordinates = [];
function initialize() {
var myLatLng = new google.maps.LatLng(0, 0);
var myOptions = {zoom: 6, center: myLatLng, mapTypeId: google.maps.MapTypeId.TERRAIN};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var geocoder = new google.maps.Geocoder;
geocoder.geocode( { 'address': "45B PATRICK AVE EDISON, NJ, 08837 United States"}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({map: map,position: results[0].geometry.location, title: "BILLING INFORMATION RECEIVED"});
View gist:1419984
function initialize() {
var flightPlanCoordinates = new Array();
var myLatLng = new google.maps.LatLng(0, 0);
var myOptions = {zoom: 6, center: myLatLng, mapTypeId: google.maps.MapTypeId.TERRAIN};
var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
var geocoder = new google.maps.Geocoder;
- @coordinates.each do |c|
geocoder.geocode( { 'address': "#{c.location}"}, function(results, status) {
View gist:1374157
require 'rubygems'
require 'fog'
require 'net/http'
require 'uri'
hostname = ENV["CDNSPARK_CDN_HOSTNAME"]
bucket = ENV["CDNSPARK_S3_ORIGIN"]
access_key_id = ENV["CDNSPARK_ACCESS_ID"]
secret_access_key = ENV["CDNSPARK_SECRET_KEY"]
View gist:1346376
info: //Node[tm10-s00000]/puppetmaster/Package[samurai]: Scheduling refresh of Exec[clear_marshal_files]
info: //Node[tm10-s00000]/puppetmaster/Package[samurai]: Scheduling refresh of Exec[full_samurai_update]
notice: //Node[tm10-s00000]/puppetmaster/Exec[clear_marshal_files]: Triggering 'refresh' from 1 dependencies
notice: //Node[tm10-s00000]/puppetmaster/Exec[full_samurai_update]: Triggering 'refresh' from 1 dependencies
notice: //Node[tm10-s00000]/puppetmaster/Exec[full_samurai_update]/returns: Parsing: tm10 (at c62e67499 by Mojo Talantikite: fixing puppetmaster internal IP)
notice: //Node[tm10-s00000]/puppetmaster/Exec[full_samurai_update]/returns: Parsing: tm20 (at aa49d1068 by watsonian: Fix external IPs for DNS servers.)
notice: //Node[tm10-s00000]/puppetmaster/Exec[full_samurai_update]/returns: Parsing: tm21 (at f3251a88e by Eduardo Tongson: VMs gone)
notice: //Node[tm10-s00000]/puppetmaster/Exec[full_samurai_update]/returns: Parsing: tm22 (at 259ee05c1 by Kevin Rutten: 31703 added PWN reporting DNS)
View gist:1222850
# partition for swap
if [ "$(arch)" == 'x86_64' ]; then
SWAPSIZE=$[`free -m | awk '/^Mem:/{print $2}'`*2]
if [ "$SWAPSIZE" -gt "4096" ]; then
SWAPSIZE=4096
fi
sfdisk -uM /dev/sdb << EOF
,$SWAPSIZE,S
,,L
EOF
@seeingidog
seeingidog / gist:1067821
Created Jul 6, 2011
redis ORMs/mongo ORM benchmarks
View gist:1067821
require 'benchmark'
require 'ohm'
require 'datamapper'
require 'dm-redis-adapter'
require "redis"
require 'json'
require 'mongo_mapper'
MongoMapper.connection = Mongo::Connection.new
@seeingidog
seeingidog / gist:973940
Created May 16, 2011
benchmark: dm-redis-adapter vs. ohm
View gist:973940
require 'benchmark'
require 'ohm'
require 'datamapper'
require 'dm-redis-adapter'
Ohm.connect
DataMapper.setup(:default, {:adapter => "redis"})
class DMUser
include DataMapper::Resource