Skip to content

Instantly share code, notes, and snippets.

View coleww's full-sized avatar

Cole Willsea coleww

  • (=^.^=)
  • Berkeley, CA
View GitHub Profile
@seejohnrun
seejohnrun / example.rb
Last active August 29, 2015 14:05
satirical ruby
class String
def |(other)
other.call(*self)
end
def >(other)
File.write(other, *self)
0
end
end
@coleww
coleww / gist:bba339511ee1ad484e79
Created July 28, 2014 03:36
Infinite endorsements
window.setInterval(function(){
document.getElementsByClassName('action-endorse')[~~(Math.random() * 4)].click()
}, 5000);
//paste this into javascript console when the 4 tile DOES __ KNOW ABOUT __? ENDORSE! dialog appears on linked in.
//they don't seem to be grepping for robots so no need to randomize the interval
//will run until they run out of recent recommendations. click around a bit and it will come up again.
@john2x
john2x / 00_destructuring.md
Last active May 13, 2025 22:05
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

export RUBY_HEAP_MIN_SLOTS=1250000
export RUBY_HEAP_SLOTS_INCREMENT=100000
export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1
export RUBY_GC_MALLOC_LIMIT=30000000
export RUBY_HEAP_FREE_MIN=12500
@edalorzo
edalorzo / brainfuck.js
Created December 12, 2013 22:26
Branfuck Interpreter
function brainfuck(code,input){
var pc = 0;
var sysout = [];
var sysin = input.split('').reverse();
var ptr = 0;
var data = [0];
var size = code.length;
var program = code.split('')
var loops = [];
@burke
burke / remotepaste.md
Last active April 18, 2025 03:35
This sets up keybindings in tmux that allow you to copy/paste to/from your OS X clipboard from tmux running inside an SSH connection to a remote host. Partially borrowed from http://seancoates.com/blogs/remote-pbcopy

Local (OS X) Side

~/Library/LaunchAgents/pbcopy.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
     <key>Label</key>
     <string>localhost.pbcopy</string>
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 5, 2025 13:05
A badass list of frontend development resources I collected over time.
@ryansobol
ryansobol / gist:5252653
Last active February 23, 2025 06:28
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@afeld
afeld / gist:4952991
Last active February 8, 2022 03:13
good APIs for mashups

This list has been superseded by Public APIs. Check there for APIs with Auth: No, HTTPS and CORS Yes.


List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.