Skip to content

Instantly share code, notes, and snippets.

View jaeh's full-sized avatar
🎆
chanting technomantic incantations.

jascha ehrenreich jaeh

🎆
chanting technomantic incantations.
View GitHub Profile
@jaeh
jaeh / somthin' like that
Created April 30, 2013 19:09
this is just a gist, but it gives an idea
var express = require('express'),
http = require('http'),
app = module.exports = express(),
server = http.createServer(app),
io = require('socket.io').listen(server);
server.listen(app.get('port'), function () {
console.log("m-cms express server listening on port %d in %s mode", app.get('port'), app.get('env'));
cb(null);
});
@jaeh
jaeh / README.md
Last active August 29, 2015 13:57 — forked from jasonsanjose/README.md

DOES NOT WORK (YET?)

Choose a directory to download both brackets-shell and brackets git respositories. The following script will setup the repositories and download required dependencies.

wget https://gist.githubusercontent.com/jaeh/9375153/raw/03d528075c9d975515cf0ade41b8b478151e5b0e/setup.sh; chmod +x setup.sh; bash setup.sh; rm setup.sh
@jaeh
jaeh / keybase.md
Created June 12, 2014 22:28
keybase.md

Keybase proof

I hereby claim:

  • I am jaeh on github.
  • I am jascha (https://keybase.io/jascha) on keybase.
  • I have a public key whose fingerprint is 4B31 9281 9DBB 5E24 3607 CB36 188C E5EC 577B 5544

To claim this, I am signing this object:

/*
* ISO 3166 Alpha-2 codes from:
* http://online-code-generator.com/iso-country-html-select-list-code.php
*
* python
* >>> l=['AF', 'AX', 'AL', 'DZ', 'AS', 'AD', 'AO', 'AI', 'AQ', 'AG', 'AR', 'AM', 'AW', 'AU', 'AT', 'AZ', 'BS', 'BH', 'BD', 'BB', 'BY', 'BE', 'BZ', 'BJ', 'BM', 'BT', 'BO', 'BQ', 'BA', 'BW', 'BV', 'BR', 'IO', 'BN', 'BG', 'BF', 'BI', 'KH', 'CM', 'CA', 'CV', 'KY', 'CF', 'TD', 'CL', 'CN', 'CX', 'CC', 'CO', 'KM', 'CG', 'CD', 'CK', 'CR', 'CI', 'HR', 'CU', 'CW', 'CY', 'CZ', 'DK', 'DJ', 'DM', 'DO', 'EC', 'EG', 'SV', 'GQ', 'ER', 'EE', 'ET', 'FK', 'FO', 'FJ', 'FI', 'FR', 'GF', 'PF', 'TF', 'GA', 'GM', 'GE', 'DE', 'GH', 'GI', 'GR', 'GL', 'GD', 'GP', 'GU', 'GT', 'GG', 'GN', 'GW', 'GY', 'HT', 'HM', 'VA', 'HN', 'HK', 'HU', 'IS', 'IN', 'ID', 'IR', 'IQ', 'IE', 'IM', 'IL', 'IT', 'JM', 'JP', 'JE', 'JO', 'KZ', 'KE', 'KI', 'KP', 'KR', 'KW', 'KG', 'LA', 'LV', 'LB', 'LS', 'LR', 'LY', 'LI', 'LT', 'LU', 'MO', 'MK', 'MG', 'MW', 'MY', 'MV', 'ML', 'MT', 'MH', 'MQ', 'MR', 'MU', 'YT', 'MX', 'FM', 'MD', 'MC', 'MN', 'ME'
ul
li
a text
li
a text
ul
li
height 20px
&:hover
@jaeh
jaeh / gist:9dfdc09f623344af1529
Created August 4, 2014 20:32
onename verification
Verifying myself: My Bitcoin username is +jascha. https://onename.io/jascha
@jaeh
jaeh / cult_of_ignorance.md
Created November 2, 2015 10:12 — forked from conspect/cult_of_ignorance.md
A Cult Of Ignorance, Isaac Asimov

It's hard to quarrel with that ancient justification of the free press: "America's right to know." It seems almost cruel to ask, ingenously, "America's right to know what, please? Science? Mathematics? Economics? Foreign languages?"

None of those things, of course. In fact, one might well suppose that the popular feeling is that Americans are a lot better off without any of that tripe.

There is a cult of ignorance in the United States, and there always has been. The strain of anti-intellectualism has been a constant thread winding its way through out political and cultural life, nurtured by the false notion that democracy means that "my ignorance is just as good as your knowledge."

Politicians have routinely striven to speak the language of Shakespeare and Milton as ungrammaticaly as possible in order to avoid offending their audiences by appearing to have gone to school. Thus, Adlai Stevenson, who incautiously allowed intelligence and learning and wit to peep out of his speeches, found the American people

@jaeh
jaeh / letsencrypt_2016.md
Created May 17, 2016 23:13 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two modes when you don't want Certbot to edit your configuration:

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80) to renew certificates.

In the following, we're setting up mydomain.com to be served from /var/www/mydomain, and challenges will be served from /var/www/letsencrypt.

#!/usr/bin/env node
const ledCount = process.argv[2] || 1;
const colorName = process.argv[3] || 'white';
const interval = process.argv[4] === 'interval';
const intervalStepDuration = process.argv[5] || 1000;
function getColors() {
const colors = {
white: [255, 255, 255],
var ua = window.navigator.userAgent
var ios13 = ua.includes('mac') && 'ontouchend' in W.D
var iDevice = ['ipad', 'iphone', 'ipod'].some(device => ua.includes(device))
var ios = iDevice || ios13
var isWebxrViewer = ios && ua.includes('webxrviewer')
if (isWebxrViewer) {
var links = document.getElementsByTagName('a')