Skip to content

Instantly share code, notes, and snippets.

View ericvanjohnson's full-sized avatar
🐘
Probably doing PHP Stuff.

Eric Van Johnson ericvanjohnson

🐘
Probably doing PHP Stuff.
View GitHub Profile
#!/bin/bash
# Set these variables
USER_NAME="[email protected]"
API_KEY="XXXXXXXX_YOUR_DHQ_API_KEY_XXXXXXXXXXXXX"
START_REV='SOME_ARBITRARY_GIT_REVISION_HASH_TO_START_FROM'
DHQ_API_PROJ="your-project-shortname"
DHQ_BASE_URL="https://yoursite.deployhq.com/"
DHQ_SERVER_GROUP="YOUR_SERVER_GROUP_UUID"
DHQ_SERVER_USERNAME="your-server-username"
public function gravatar($email, $size = 70, $default = "monsterid") {
return "http://www.gravatar.com/avatar/" .
md5(strtolower($email)) .
"?s=" . (integer) $size .
"&d=" . urlencode($default) .
"&r=G";
}
var http = require('http');
var pg = require('pg');
var connectionString = "pg://chartjes:********@localhost:5432/ibl_stats";
pg.connect(connectionString, function(err, client) {
if (err) {
console.log(err);
} else {
http.createServer(function(request, response) {
response.writeHead(200, {'Content-Type': 'text/html'});