Skip to content

Instantly share code, notes, and snippets.

✌( ͡ᵔ ͜ʖ ͡ᵔ )✌

Max Ogden maxogden

✌( ͡ᵔ ͜ʖ ͡ᵔ )✌
Block or report user

Report or block maxogden

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
  • Go to and click Deploy;
  • Choose a name (like test-dat);
  • Wait for deploy to finish and click "View it" (;
  • Click import -> paste JSON -> Copy/Paste example;
  • Do dat clone and cd into folder;
  • Do dat serve and go to localhost:6461;
  • PROBLEM 1: No data;
  • Kill, do echo '{"hello":"world"}'|dat import --json and serve again;
  • Now there's some data, kill and do dat push
  • PROBLEM 2: Nothing changed on Heroku
View index.html
<!DOCTYPE html>
<link rel="stylesheet" href="style/main.css" type="text/css">

The Assembly and Interpretation of Transit Data

A freeway, Tilton warned, "is a device which can make or break the city. It can liberate or contribute to congestion. It can cut the city into unrelated parts, or bind it together. It can destroy values, or create new ones. The State cannot soundly develop its urban freeway plans without attention to the planning problems of the city itself." Tilton criticized the state for a narrow approach that considered merely "the assembly and interpretation of traffic data...

substack / default.json
Created Dec 22, 2013
my pkginit config
View default.json
"name": basename.replace(/^node-/, ''),
"version": "0.0.0",
"description": (function (cb) {
var fs = require('fs');
var value;
try {
var src = fs.readFileSync('README.markdown', 'utf8');
value = src.split('\n').filter(function (line) {
return /\s+/.test(line)
View gist:8088601
"name" : basename.replace(/^node-/, ''),
"description" : prompt(),
"version" : "0.0.0",
"repository" : {
"type" : "git",
"url" : "git://" + basename + ".git"
"homepage": "" + basename,
"main" : prompt('entry point', 'index.js'),
jlord /
Last active Feb 9, 2016 — forked from maxogden/
imagemagick script: image background is a larger, blurred copy of itself.
for f in *.jpg; do
convert ./"$f" -gravity center -resize 1137 -extent 1137x640 -blur 0x4 ./finalcat/"new-$f"
convert ./finalcat/"new-$f" -page +248 ./"$f" -flatten ./finalcat/"new-$f"
rahuljiresal / openshift-node-force-domain.js
Last active Jul 22, 2016
This is a middleware for Connect and Express that redirects any requests to a default domain. Based on, modified to work on Openshift platform.
View openshift-node-force-domain.js
Openshift uses haproxy ( as a front proxy to route request to instances of the app.
This proxy does the job of unwrapping https and sets the 'x-forwarded-proto' header.
Because of this, the Node.JS app never sees the actual protocol of the request, unless it checks the presence of this header.
I modified the code written by goloroden ( to check this header instead of ports.
This gist does exactly what his code does, except checks for actual protocol instead of relying on the port for the protocol.
var rewrite = function (route, options) {
options = _.defaults({
View gist:389875
import re
from metaphone import dm as double_metaphone
# get the Redis connection
from jellybean.core import redis
import models
# Words which should not be indexed
daddz / file_queue.rb
Created Apr 1, 2010
a ruby queue based on a file
View file_queue.rb
class FileQueue
def initialize(file_name)
@file_name = file_name
def push(obj)
safe_open('a') do |file|
file.write(obj + "\n")
holms /
Last active Mar 15, 2019
Install full ffmpeg in debian wheezy (with aac(m4a) and x264 support)
# Add multimedia source
echo "deb wheezy main non-free" >> /etc/apt/sources.list
echo "deb-src wheezy main non-free" >> /etc/apt/sources.list
apt-get update
apt-get install deb-multimedia-keyring # if this aborts, try again
apt-get update
# Go to local source directory
cd /usr/local/src
You can’t perform that action at this time.