Skip to content

Instantly share code, notes, and snippets.

View coleww's full-sized avatar

Cole Willsea coleww

  • (=^.^=)
  • Berkeley, CA
View GitHub Profile
@coleww
coleww / codegolfbot
Last active August 29, 2015 14:04
mbot codegolf problems
problems for mbot codegolf tournament script thing.
mbot will spit a prompt out into a room, and provide a sample input and output.
code is run in a node sandbox like so:
"(function($){" + CODE_STRING_FROM_USER + "})(" + case.input + ")"
So a golfers response has access to the input via the $ variable, and must return an output that matches the case.output.
@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.
// um so i kind of want my personal site to show something different
// depending on what operating system the user is on.
// or something...
if (navigator.appVersion.indexOf("Linux")!=-1) {
}else if (navigator.appVersion.indexOf("Win")!=-1) {
}else if (navigator.appVersion.indexOf("Mac")!=-1) {
@coleww
coleww / $.get.rb
Last active August 29, 2015 14:05
$.get() in Ruby
require 'open-uri'
def get url, callback
Thread.new { callback[open url, &-> (u) { u.read }] }
end
get 'http://colewillsea.com', (method :puts)
@coleww
coleww / gist:820d5bb63a1518afb8d9
Created August 22, 2014 19:48
Make Facebook Useable
button {
display: none;
}
a {
display: none;
}
#rightCol {
display: none;
@coleww
coleww / gist:11963433bd480c795e33
Last active August 29, 2015 14:05 — forked from garybernhardt/gist:57047446ec80c0913166
Forge Driven Development
Turning The Metal Clock Back
Forge-driven metal principles haven't had the effect we hoped for. The
NORCAL principles are excellent metal guidelines, but experience shows that
metallurgists find them difficult to follow. What do we do about this?
Surprisingly, the Structured metal literature of two months ago contains
compelling solutions to many current metal problems. They're simple and easy
to understand, but were lost in the noise as TDD rose to popularity. We'll
reinterpret these simple metal ideas in a modern context, finding that many of
our most promising new metal ideas resemble them. Rapid reverse-forge driven
@coleww
coleww / my credentials
Last active August 29, 2015 14:05
Resume
my code so fine but my language coarse
i be making pull requests on that open source
configuring nginx and modifying them CORS
but you can't see me bruh cuz i'm browsing with TOR
and all these haters open issues like owe them wrappers
around some random API cuz their app is backwards
but I aint got time, cuz their app doesn't matter
@coleww
coleww / gist:45e4660b80675c59d084
Created August 28, 2014 20:04
i hate refinery so much
config.to_prepare do
module ActiveRecord
class Relation
def with_query(query='')
self.merge(self.class.name.split("::")[0...-1].join("::").constantize.search_by_title(query))
end
end
end
end
@coleww
coleww / TDD IS ALIVE
Created August 29, 2014 12:48
not sure i understand "Node"...
var test = require('tap').test;
var tests = require('./tests.js');
tests(test);
@coleww
coleww / onek
Created August 31, 2014 17:11
1,000 lines of A Thousand Plateaus
and the sequence of nucleic units, with binary relations between units of the same type and biunivocal relationships between units of different types. Thus there are always two articulations, two segmentarities, two kinds of multiplicity, each of which brings into play both forms and substances. But the distribution of these two articulations is not constant, even within the same stratum.
"before" the State, and of the State "after" the primitive peoples—as if the two waves that seem to us to exclude or succeed each other unfolded simultaneously in an "archaeological," micropo-litical, micrological, molecular field.
(segmentometers), and conversions into lines of death (deleometers). Thus there is a whole process of selection of assemblages
A becoming is not a correspondence between relations. But neither is it a resemblance, an imitation, or, at the limit, an identification. The whole
a continuous variation for a discontinuous variable ... A variable can be continuous over a portion of its trajectory,