Skip to content

Instantly share code, notes, and snippets.

div blah
//
comment
new line still comment
still comment
div not comment
var arr = [1, 2, 3, 4, 5, 6, 7, 8]
, highest
for (var i = 0; i < arr.length; i+=1) {
if (i === 0) highest = arr[i]
if (highest < arr[i]) highest = arr[i]
}
console.log(highest)
<form name="search" action="/search">
<input type="text" name="query" value="">
</form>
State: - pip
Name: pagerduty
Function: installed
Result: False
Comment: An exception occured in this state: Traceback (most recent call last):
File "/vagrant/srv/salt/salt-github/salt/state.py", line 824, in call
ret = self.states[cdata['full']](*cdata['args'])
File "/vagrant/srv/salt/salt-github/salt/states/pip.py", line 100, in installed
version = list(pkg_list.values())[0]
var redis = require('redis')
var c = redis.createClient(null, null, {return_buffers:true})
c.lpush('foobar', new Buffer('foobar'))
c.rpop('foobar', function (err, res) {
console.log(res)
})
// nested
db.call(query, function (err, value) {
// do stuff here
nestedFn('foo', function (err, something) {
// do more stuff here
})
})
// below
db.call(query, gotValue)
@chapel
chapel / Geeklist.json
Created June 5, 2012 20:32 — forked from jnpetersen/Geeklist JSON
GKLST Message Types
{
"created_at": "2012-05-30T05:49:19.548Z",
"messagetypes": {
"card": {
"template": "{{user1}} published a card",
"dataMap": {
"user1": "activity.user.screen_name"
}
},
"micro": {
@chapel
chapel / ideal ops.md
Created May 27, 2012 16:27 — forked from bhenerey/ideal ops.md
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan

@chapel
chapel / geeklistAPIideas.md
Created May 1, 2012 21:18 — forked from csanz/geeklistAPIideas.md
Geeklist API Hackathon Ideas (In Progress)
  • An app that coordinates code commits with songs being played on Spotify
  • Post micros via SMS (with Twilio)
  • Geeklist profile to achievements based resume
var http = require('http'),
cluster = require('cluster')
function hydraServer(requestListener, heads){
var server,
i;
if(cluster.isMaster) {
for(i = 0; i < heads; i++) {
cluster.fork()
}