This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# The MySQL database server configuration file. | |
# | |
# You can copy this to one of: | |
# - "/etc/mysql/my.cnf" to set global options, | |
# - "~/.my.cnf" to set user-specific options. | |
# | |
# One can use all long options that the program supports. | |
# Run program with --help to get a list of available options and with | |
# --print-defaults to see which it would actually understand and use. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Mandelbrot set with asm.js</title> | |
<meta charset="utf-8" /> | |
</head> | |
<body> | |
<canvas id="c"></canvas> | |
<div id="status"></div> | |
<script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include <stdio.h> | |
#include <sys/time.h> | |
double microtime(); | |
// C version of bench from Bug 879891. 1 iteration completes in 0.17 seconds | |
void compute(int *image); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This supports: foo, foo.bar, foo.bar.baz (dot notation, | |
// like mongodb) and also passing in a custom accessor function | |
_get: function(o, accessor) { | |
var fn = accessor; | |
if (typeof(accessor) === 'string') { | |
fn = function(o) { | |
var keys = accessor.split(/\./); | |
_.each(keys, function(key) { | |
o = o[key]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# On the specified host, install the specified version of node | |
if [ -z "$1" ] | |
then | |
echo "First argument must be somehost.com, second argument must be desired node version" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
(cd server-status && git pull) || | |
(rm -rf server-status && git clone https://github.com/punkave/server-status) | |
) && | |
cd server-status && | |
npm install ... etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name site1 www.site1; | |
location / { | |
rewrite ^/apartments http://site2/communities; | |
rewrite ^.*$ http://site2/something-else; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.db.command({ 'serverStatus': 1 }, function(err, result) { | |
if (err) { | |
return callback(err); | |
} | |
var versions = result.version.split(/\./); | |
if ((versions[0] < 2) || ((versions[0] == 2) && (versions[1] < 6))) { | |
return callback(new Error('\n\nMONGODB TOO OLD: your server must be at least MongoDB 2.6.0.\nYou currently have: ' + result.version)); | |
} | |
return callback(null); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name oldname; | |
location / { | |
rewrite ^(.*)$ http://newname$1; | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm ERR! <?xml version="1.0" encoding="utf-8"?> | |
npm ERR! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
npm ERR! "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
npm ERR! <html> | |
npm ERR! <head> | |
npm ERR! <title>200 OK</title> | |
npm ERR! </head> | |
npm ERR! <body> | |
npm ERR! <h1>Error 200 OK</h1> | |
npm ERR! <p>OK</p> |