Skip to content

Instantly share code, notes, and snippets.

View wjessop's full-sized avatar
🤖

Will Jessop wjessop

🤖
View GitHub Profile
Three spams From: Dixon Fiske <dixon@boundary.com>
Hey Will,
Last try. Hope you get a chance to check it out.
Thanks,
Dixon
@wjessop
wjessop / gist:b6a0e4eacaca268d9163
Last active August 29, 2015 14:11
bone benchmarks with more complex route
One route: /some/more/comlplex/route
Requesting: /
BenchmarkBoneMux 3000000 466 ns/op
BenchmarkZeusMux 5000000 369 ns/op
BenchmarkHttpRouterMux 5000000 341 ns/op
BenchmarkNetHttpMux 2000000 616 ns/op
BenchmarkGorillaMux 2000000 625 ns/op
BenchmarkGorillaPatMux 2000000 776 ns/op
<div class="field sweet_honey_for_bots">
<%= label_tag :sweet_honey, "This is a honeypot, if you see this your CSS is turned off or you're a bot. If you're not a bot don't fill it in." %>
<%= text_field_tag :sweet_honey %>
</div>
require "minitest/unit"
require 'minitest/autorun'
def calculate(str)
acc = state = 0
op = "+"
str.scan(/(?:.+?\b)/) do |atom|
if (state = 1 - state) == 1 # number state
acc = acc.send(op, Integer(atom))
else # op state
[2.1.2] ~ $ irb
2.1.2 :001 > require 'tmpdir'; puts "foo"; Dir.tmpdir { |dir| puts "bar" }
foo
=> "/var/folders/r7/kjzbwmx533b20hcf1_s9kc9c0000gn/T"
// Tankdrive function, that converts the x and y values
// to store as left/right
function tankdrive(x, y) {
// first Compute the angle in deg
// First hypotenuse
var z = Math.sqrt(x*x + y*y);
// angle in radians
rad = Math.acos(Math.abs(x)/z);
// and in degrees
@wjessop
wjessop / gist:14c51363acb189b17963
Last active August 29, 2015 14:03
90's house and dance
Please make suggestions to @will_j on twitter
- Additions
- Removals
- Ordering
- etc.
Rules:
- 90's Dance or house in the style of what's already on the list
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1397834652000",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": [

Keybase proof

I hereby claim:

  • I am wjessop on github.
  • I am wj (https://keybase.io/wj) on keybase.
  • I have a public key whose fingerprint is C8A4 CD1E A9C6 B7EF 61C5 3CE8 2571 144B 6931 2734

To claim this, I am signing this object: