For use on:
https://console.aws.amazon.com/s3/home
Only tested in Chrome.
Installation instructions:
- View > Always Show Bookmarks Bar.
For use on:
https://console.aws.amazon.com/s3/home
Only tested in Chrome.
Installation instructions:
express = require 'express' | |
app = express() | |
# the list of all messages we've received: | |
messages = [] | |
# a map from all the clients we've seen (by their IDs), | |
# to their next unseen messages (by the messages' indices): | |
clients = {} |
--- | |
title: 500 Internal Server Error | |
--- | |
<article> | |
<h1>500 Internal Server Error</h1> | |
<p> | |
Sorry, something’s gone wrong on our end. | |
We apologize for the inconvenience. | |
</p> |
var cluster = require('cluster'); | |
var http = require('http'); | |
var numCPUs = require('os').cpus().length; | |
var pid = process.pid; | |
var port = process.env['PORT'] || 8000; | |
if (cluster.isMaster) { | |
console.log('Master:', pid); | |
// Fork workers -- one less than the number of CPUs. |
bunyan = require 'bunyan' | |
restify = require 'restify' | |
requireDir = require 'require-dir' | |
middleware = requireDir './middleware' | |
routes = requireDir './routes' | |
settings = require './settings' | |
app = restify.createServer | |
name: 'Foo Bar API' |
$ git push | |
Counting objects: 104, done. | |
Delta compression using up to 4 threads. | |
Compressing objects: 100% (83/83), done. | |
Writing objects: 100% (83/83), 12.38 KiB, done. | |
Total 83 (delta 64), reused 0 (delta 0) | |
error: hooks/post-receive died of signal 2 | |
remote: /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/connection/hiredis.rb:23:in `connect': Timeout::Error (Timeout::Error) | |
remote: from /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:204:in `establish_connection' | |
remote: from /data/github/current/vendor/gems/ruby/1.8/gems/redis-2.2.0/lib/redis/client.rb:23:in `connect' |
results = @query _, """ | |
START author=node({authorId}), target=node({targetId}) | |
CREATE comment={commentData} | |
CREATE comment -[:#{@REL_AUTHOR} {relAuthorData}]-> author | |
CREATE comment <-[:#{@REL_COMMENT} {relTargetData}]- target | |
SET author.numCommentsBy = COALESCE(author.numCommentsBy?, 0) + 1 | |
SET target.numComments = COALESCE(target.numComments?, 0) + 1 | |
RETURN comment | |
""", | |
authorId: author.id |
#!/usr/bin/env bash | |
# | |
# Wrapper around gmvault binary that sets default options. | |
GMVAULT_DIR="$HOME/Dropbox/Applications/Utilities/gmvault-v1.7-beta/bin/" | |
DB_DIR="$HOME/Dropbox/.gmvault-db" | |
# Run in a sub-shell since we need to change directories: | |
( | |
cd $GMVAULT_DIR |
Now a standalone npm module:
var bases = require('bases'); | |
var crypto = require('crypto'); | |
// Returns a base-62 (alphanumeric only) string of the given length: | |
function randomStr(length) { | |
// We generate a random number in a space at least as big as 62^length, | |
// and if it's too big, we just retry. This is still statistically O(1) | |
// since repeated probabilities less than one converge to zero. Hat-tip to | |
// a Google interview for teaching me this technique! ;) |