Skip to content

Instantly share code, notes, and snippets.

View sailors.sql
-- to start SQLite3 (worked on my Mac and on CAEN)...
-- sqlite3 sailors.db
-- to run this file in SQLite3...
-- .read this_filename.sql
drop table if exists Sailors;
create table Sailors (
sid integer primary key,
name varchar(100),
View app.js
var express = require('express');
var app = express();
app.all('*', function(req, res, next) {
var youAreAllowed = Math.random() < 0.5; // example
if (youAreAllowed)
EvanHahn /
Created Apr 15, 2014
Daily programmer #158, in Brainfuck
first digit
second digit
third digit
View gist:51b35166bfe77694d317
var iframesLoaded = 0;
$("form").each(function() {
var $form = $(this);
var $iframe = $("<iframe name='temporary-iframe'></iframe>");
var oldTarget = $form.prop("target");
$form.prop("target", "temporary-iframe");
EvanHahn / app.js
Created Jun 24, 2014
Dealing with Helmet issue #55.
View app.js
var path = require("path");
var connect = require("connect");
var favicon = require("serve-favicon");
var helmet = require("helmet");
var app = connect();
var faviconPath = path.resolve(__dirname, "favicon.ico");
EvanHahn / .gitignore
Last active Aug 29, 2015
Working on Helmet issue #57.
View .gitignore
EvanHahn / brochure.css
Created Jul 21, 2014
showing the difference in the brochure for website issue #18230
View brochure.css
@charset "UTF-8";
/* ======================================================
v 0.1.0
Versioned according to
Primary Maintainer: @albert
====================================================== */

Keybase proof

I hereby claim:

  • I am EvanHahn on github.
  • I am evanhahn ( on keybase.
  • I have a public key whose fingerprint is C3AB 6FA7 DC98 0294 2D89 C540 4329 0CC8 681B 62EB

To claim this, I am signing this object:

View gist:99edd459a4f08bb6fd6c
var express = require('express');
var path = require('path');
var HEADER_VALUE = "default-src 'self';";
var HEADERS = [
EvanHahn / apm_remove_versions.rb
Created Jan 8, 2015
A Ruby script to remove versions from the output of `apm list --installed --bare`.
View apm_remove_versions.rb
#!/usr/bin/env ruby
IO.foreach(ARGV.first) do |line|
puts line.split('@').first
# Licensed under the Unlicense. <>
You can’t perform that action at this time.