Skip to content

Instantly share code, notes, and snippets.

body { font-family: Helvetica; text-rendering: optimizeLegibility; }
section { display: block; width: 24.5%; float: left; border-left: 1px dotted #dcdcdc; }
a { text-decoration: none; }
img { border: 0; }
#tweets, #retweets, #favorites, #conversations { font-size: 14px; padding: 0; margin: 0; }
#tweets a, #retweets a, #favorites a, #conversations a { color: #2277bb; }
#tweets .meta a, #retweets .meta a, #favorites .meta a, #conversations .meta a { color: #999; background: #f7f7f7; }
{
"user": {
"profile_text_color": "333333",
"url": null,
"listed_count": 4,
"created_at": "Tue Jun 10 13:03:54 +0000 2008",
"profile_sidebar_fill_color": "efefef",
"screen_name": "virgiliocorrado",
"contributors_enabled": false,
"profile_background_tile": true,
@moderation
moderation / types.go
Created February 4, 2011 18:11
Updated types.go file for hoisie/twitterstream after getting a bit of help from @enneff
package twitterstream
type Hashtags struct {
Indices []int
Text string
}
type Urls struct {
Url string
Indices []int
@moderation
moderation / websocket_client.go
Created April 24, 2011 20:07
golang websockets client
package main
import (
"fmt"
"websocket"
)
// const message = "A message"
func main() {
@moderation
moderation / fibonacci.go
Created December 2, 2011 01:16
will it recur fibonacci
package main
import (
"fmt"
"time"
)
func fibonacci(n int) int {
var a int
#!/usr/bin/env node
var util = require('util'),
http = require('http'),
events = require('events'),
oauth = require('oauth').OAuth,
fs = require("fs"),
crypto = require("crypto"),
ws = require('websocket-server');
@moderation
moderation / gist:2467004
Created April 22, 2012 21:22
SPDY proxy
var fs = require('fs'),
spdy = require('spdy'),
httpProxy = require('http-proxy');
var options = {
key: fs.readFileSync(__dirname + '/moderation-key.pem'),
cert: fs.readFileSync(__dirname + '/moderation-cert.pem'),
ca: fs.readFileSync(__dirname + '/moderation-csr.pem')
};
@moderation
moderation / gist:2643732
Created May 9, 2012 11:00
node-spdy spdy-v3 crash
/Users/moderation/Library/Github/node-spdy/lib/spdy/server.js:279
if (settings.initial_window_size) {
^
TypeError: Cannot read property 'initial_window_size' of undefined
at Connection.setDefaultTransferWindow (/Users/moderation/Library/Github/node-spdy/lib/spdy/server.js:279:15)
at Parser.<anonymous> (/Users/moderation/Library/Github/node-spdy/lib/spdy/server.js:197:14)
at Parser.emit (events.js:87:17)
at onFrame (/Users/moderation/Library/Github/node-spdy/lib/spdy/parser.js:185:12)
at Framer.execute (/Users/moderation/Library/Github/node-spdy/lib/spdy/protocol/v2/framer.js:50:5)
at Parser.execute (/Users/moderation/Library/Github/node-spdy/lib/spdy/parser.js:179:19)
@moderation
moderation / raspberrypi_tips
Last active October 3, 2016 22:43
Raspberry Pi tips including setting up Go and Node.js
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=10781
Adjust your environment to include:
GOARM=5
GOOS=linux
GOARCH=arm
GOPATH=<root for packages>
$ sudo apt-get install mercurial # get mercurial
$ sudo apt-get install git # for go get ...
@moderation
moderation / 9 principles.md
Last active December 16, 2015 00:39
9 principles

Ito: There are nine or so principles to work in a world like this:

  1. Resilience instead of strength, which means you want to yield and allow failure and you bounce back instead of trying to resist failure.
  2. You pull instead of push. That means you pull the resources from the network as you need them, as opposed to centrally stocking them and controlling them.
  3. You want to take risk instead of focusing on safety.
  4. You want to focus on the system instead of objects.
  5. You want to have good compasses not maps.
  6. You want to work on practice instead of theory. Because sometimes you don’t why it works, but what is important is that it is working, not that you have some theory around it.
  7. It disobedience instead of compliance. You don’t get a Nobel Prize for doing what you are told. Too much of school is about obedience, we sh