Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rodcul's full-sized avatar

Rodney Cullen rodcul

View GitHub Profile
@rodcul
rodcul / fullpage.js
Last active September 7, 2016 10:53 — forked from nhoizey/screenshots.js
Take screenshots at different viewport sizes using CasperJS
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();
@rodcul
rodcul / 5-things-zapier.md
Last active January 21, 2016 11:33
5 Things for ZAPIER

5 things for ZAPIER

That excite me (in order)

  1. Embracing the code of conduct
  2. Dream up the future of Zapier, inspire and motivate your teammates
  3. Be responsible for hitting or missing a big company goal (maybe a metric or timeline)
  4. Decide core KPIs for projects at Zapier
  5. Seek improvements to internal tools & process (Agile Coaching?)
@rodcul
rodcul / gist:21a79d80f55a87862cbb
Created June 10, 2015 16:03
Chitter API spec

Get a list of peeps

GET /peeps
{
"items": [
	{"id": 1,
	"created_at": "2009-07-12T20:10:41Z",
@rodcul
rodcul / gist:675dc6657610892bd246
Last active August 29, 2015 14:22
RUBY (sync) vs JS (async)

Ruby Synchronous code:

def short
  puts 'short - ' + Time.now.to_s
end

def long
  sleep 2
 puts 'long - ' + Time.now.to_s
@rodcul
rodcul / gist:af219bc3b1a1e7978bc7
Last active August 29, 2015 14:21
Bookmark Manager on Heroku
@rodcul
rodcul / expectation_matchers.rb
Created May 5, 2015 11:13
RSPEC: Expectation Matches Cheatsheet
describe 'Expectation Matchers' do
describe 'equivalence matchers' do
it 'will match loose equality with #eq' do
a = "2 cats"
b = "2 cats"
expect(a).to eq(b)
expect(a).to be == b # synonym for #eq
@rodcul
rodcul / gist:6972a998ee28b4f21f3d
Created April 28, 2015 08:49
Wolf of Commercial Street
def makemerich(array)
output = Array.new
diff = 0
array.each_with_index do |item1,index1|
array.each_with_index do |item2,index2|
n = 0
n = item2-item1 if index2 > index1
output = index1,index2 if n > diff
end
end
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://192.168.12.62/openx/www/delivery/ajs.php':'http://192.168.12.62/openx/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=1");
document.write ('&amp;cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
document.write ("&amp;loc=" + escape(window.location));