Skip to content

Instantly share code, notes, and snippets.

View reconbot's full-sized avatar
🏴‍☠️
Building at @github

Francis Gulotta reconbot

🏴‍☠️
Building at @github
View GitHub Profile
@reconbot
reconbot / 0_reuse_code.js
Created August 9, 2014 01:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@reconbot
reconbot / Tweets.txt
Last active August 29, 2015 14:07
Reactive Systems Design
https://twitter.com/reconbot/status/516616016244518913
function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) {
var R = 6371; // Radius of the earth in km
var dLat = deg2rad(lat2-lat1); // deg2rad below
var dLon = deg2rad(lon2-lon1);
var a =
Math.sin(dLat/2) * Math.sin(dLat/2) +
Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
Math.sin(dLon/2) * Math.sin(dLon/2)
;
var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a));
@reconbot
reconbot / unused.rb
Created February 5, 2015 20:06
Print unused cuke defs
# Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved.
#
# http://www.natontesting.com
#
# Save this in a file called 'unused.rb' in your 'features/support' directory. Then, to list
# all the unused steps in your project, run the following command:
#
# cucumber -d -f Cucumber::Formatter::Unused
#
# or...
@reconbot
reconbot / Gemfile
Last active August 29, 2015 14:15
★ robohouse$ ruby house.rb
source 'https://rubygems.org'
ruby '2.2.0'
gem 'nest_thermostat'
gem 'httparty'
gem 'pry'
gem 'awesome_print'
@reconbot
reconbot / whatever.js
Last active August 29, 2015 14:18
playing around
var updateOrCreate = function(repo){
return pouch.get(repo.id).then(function(doc){
return pouch.update(repo);
},function(err){
if (err.status !== 404) { throw err; }
return pouch.put(repo);
});
};
updateOrCreate({id:"thingy"}).then(function(){
┌──────────────────────────────────────────────────────────────────────────────────────────────┐
│ │
│ │
│ │
│ .d8888b. 888 888888b. 888 888d8b │
│ d88P Y88b 888 888 "88b 888 888Y8P │
│ 888 888 888 888 .88P 888 888 │
│ 888 .d88b. .d88888 .d88b. 8888888K. 888 888 .d88888 .d88888888 .d88b. .d8888b │
│ 888 d88""88bd88" 888d8P Y8b 888 "Y88b888 888d88" 888d88" 888888d8P Y8b88K │
│ 888 888888 888888 88888888888 888 888888 888888 888888 88888888888888"Y8888b. │
THE LONELY ISLAND LYRICS
"Lazy Sunday"
(feat. Chris Parnell)
[The Lonely Island]
Lazy Sunday, wake up in the late afternoon
Call Parnell just to see how he's doin (Hello?)
What up, Parns? (Yo Samberg, what's crackin?)
You thinkin what I'm thinkin? (NARNIA!) Man it's happenin
(But first my hunger pangs are stickin like duct tape)
@reconbot
reconbot / gist:80240
Created March 17, 2009 02:38
local edit .htaccess
<html>
<head>
<title>.htaccess Editor</title>
</head>
<body>
<center>
<br /><br />
<h1>.htaccess Editor</h1>
<br />
<b>This is a php based .htaccess editor. Its probably a bad idea. but at least you have to be from localhost.</b>
// ==UserScript==
// @include http://www.google.*/
// @include http://www.google.*/search*
// @include http://www.bing.com/
// @include http://www.bing.com/search*
// @include http://www.yahoo.com/
// @include http://search.yahoo.com/search*
// ==/UserScript==
document.querySelector('input[name=q], input[name=p]').value = " -w3schools";