Skip to content

Instantly share code, notes, and snippets.

View wjessop's full-sized avatar
🤖

Will Jessop wjessop

🤖
View GitHub Profile
package backup_downloader
import (
"bytes"
"io"
"log"
"os"
"os/exec"
"sync"
)
@wjessop
wjessop / gist:4996860
Created February 20, 2013 16:33
sendcat output
[1.9.3] ~ $ cd Desktop/Funny\ pictures/
[1.9.3] ~/Desktop/Funny pictures $ sendcat *
https://sendc.at/dl/3kqUAI5QGty5uCzqHVbIiCJGZDoULqrSsINOJTAgIEfJBnEHsr62Pel
105.gif was already uploaded, skipping
1265713754_fl: 100% |========================| 469.1KB 108.8KB/s ETA: 00:00:00
1324316240_ca: 100% |========================| 3.4MB 121.8KB/s ETA: 00:00:00
1RyYE.gif was already uploaded, skipping
1rSzCqgzWn8kh: 100% |========================| 1.9MB 117.7KB/s ETA: 00:00:00
1vlzxNk.jpeg: 100% |========================| 226.0KB 101.5KB/s ETA: 00:00:00
292920_10150689018263944_156425228943_9541657_455613102_n.jpg was already uploaded, skipping
@wjessop
wjessop / gist:4747914
Created February 10, 2013 01:30
BERT decoded
magic| tuple | atom | bert | | dict | list 1 elem | list | atom | key | atom | | val | nil | nil
131, 104, 3, 100, 0, 4, 98, 101, 114, 116, 100, 0, 4, 100, 105, 99, 116, 108, 0, 0, 0, 1, 108, 0, 0, 0, 2, 100, 0, 3, 107, 101, 121, 100, 0, 3, 118, 97, 108, 106, 106
production:
adapter: postgresql
encoding: unicode
database: secret_development
pool: 5
username: will
password:
I saw C++ coming and read the book - or at least tried to read the book -
there's a dent
in the wall behind my piano, where the book hit the wall - Improvements to
C should make things
easier not more complicated, I thought.
-- Joe Armstrong, http://erlang.org/pipermail/erlang-questions/2013-January/071949.html

Simple fried mushroom spaghetti

A fast and easy dish, great for lunch, takes about 10-15 minutes, basically as long as it takes you to boil the water and cook the spaghetti, the rest of the prep can be done while the pasta is cooking.

Ingredients

  • 100g fancy mushrooms. I buy these from Sainsburys (makes two servings)
  • 4 or 5 regular button mushrooms
  • 1 clove garlic
  • Salt
[1.9.3] ~/www/demo $ curl -v -d auth_token=8ygqnnCEyVvj9qkdX63W http://localhost:3000/foo.json
* About to connect() to localhost port 3000 (#0)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 3000 (#0)
> POST /foo.json HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:3000
[1.9.3] ~/www/demo $ curl -v -d auth_token=8ygqnnCEyVvj9qkdX63W http://localhost:3000/foo.json
* About to connect() to localhost port 3000 (#0)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 3000 (#0)
> POST /foo.json HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:3000
(master) tomato:railties will$ ruby -Itest:lib:/home/travis/build/rails/rails/railties/../activesupport/lib:/home/travis/build/rails/rails/railties/../actionpack/lib:/home/travis/build/rails/rails/railties/../activemodel/lib test/application/initializers/i18n_test.rb
Run options: --seed 25630
# Running:
.F.......FF......
Finished in 68.520628s, 0.2481 runs/s, 0.3794 assertions/s.
1) Failure:
Ruby compiled with:
'optflags=-O0' 'debugflags=-g3 -ggdb' 'CFLAGS=-O0 -g3 -ggdb'
Confirmed with:
ruby -e 'puts RbConfig::CONFIG["CFLAGS"]'
GDB output shows it reading symbold from Rub, but setting a breakpoint GDB can't find the symbol requested and ultimately never breaks: