Skip to content

Instantly share code, notes, and snippets.

Avatar
🥪
oh hai there

Abraham Williams abraham

🥪
oh hai there
View GitHub Profile
@abraham
abraham / enable-print-styles.js
Created Sep 5, 2018
Enable CSS that is behind a `@media print` media query
View enable-print-styles.js
Object.keys(document.styleSheets).forEach(function(styleSheetKey) {
var rules = document.styleSheets[styleSheetKey].rules || {};
Object.keys(rules).forEach(function(ruleKey) {
var media = rules[ruleKey].media;
if (media) {
media.mediaText = media.mediaText.replace('print', 'screen');
}
});
});
View main.ts
import { one, two, pipe } from './utils';
class Main {
public sentence() {
return pipe<string>('word',
addPeriod,
capitalize);
}
}
@abraham
abraham / example.json
Created Jul 7, 2018
Split a large JSON file into multiple files
View example.json
[
{"one":"two"},
{"three":"four"}
]
View quote.json
{
"is_quote_status": true,
"quoted_status": {
"is_quote_status": true,
}
}
@abraham
abraham / belt.txt
Created Jun 4, 2017
Factorio 16x2 belt branch blueprint
View belt.txt
0eNqlne2uXbeVbN/l/NZp7MVv5lUajYukIwQCHFmQpUYHgd/9Ht8c6XZLe0ujBn8JtuziZK3FNbnJmjX/+fSXXz6//fDx3ftPT3/659O7//z1/W9Pf/r3fz799u5v7//8yx//7tM/Prx9+tPTu09v//705un9n//+xz+9/e8PH9/+9tvzp49/fv/bh18/fnr+y9tfPj39/ubp3fu/vv3vpz9dv//Hm6e37z+9+/Tu7b8Q/98//OP/vP/897+8/fjyH/wM683Th19/e/nff33/RxQvkM/XfPP0j5c/S3kZ56/vPr79z3/9bfv9zXfw5Tv43z788u7Tp5e/uwM8/q2/QtefQ9cIun+FBlG3CLolUXfBd+ORDwFfOfyMiCkJMSuCvpLHuSPoWxL1dROE33jol1ifO4CP1ueKmInW50ye5xWtz+ijcon1OYLIxfpMiInWZ/TduqL1WaPHGa3P6KNSxPIsQXa7gsizwJOFGbFdakxJwkiL0ZPYe8BK9HqXESBHH6syY0aCD0pJlmX0JSw7jjtIPPUWxB3lnZqsyWwfUUtMSZLra5Ixs21KzZdlsi2sybrMtoU1WZjZLr/mKzPZitdkaWY/Imq+NpMfbS1ZnNmPtnbye/P2v/HLPfxygH+B+KvAH0H8TeD3+/h34/9+pX5+/9e3H//28deXP386g28ZevP1WOL9h89/nDt8P+BQA3Y/4Dz4hU0YXAc/sQn+PogfvMH9dhA/wTcrvHB+ulnh1338cQ+/qhe26Be2NzXg5QfsB2cWhMHhzyzAJ7LPg/DJC7x8+ARerO/F2RlieU+++sZlXtal39VRzHjTj1f9+Q+hr/nzHwJ/cHoFXt1xcHpF4MXCDhL3EOu68q/e2OZNrfpNnTczXvPjXf4oDdA3i4cH79bM13XlH93Z9JkaQTd79oMXa+jJkAcx9QEhWOMzX+PBF2RuHTtgZpkF7dfzytdzsE9YRZ96EnSzR/ebgtX0ZMhz7/qgFXxXV76aV4A+deyEmSUes99rLnGqdvH
@abraham
abraham / book.txt
Created Jun 3, 2017
Factorio 16 blue belt green circuit outpost
View book.txt
0eNq9vd2SHceRdfkqNFwTbSf+MjJ1N3Mx8wIzV21tbSBYTZUJBDAAqK9lbXr3qQIBsCierLP2Cum7abZAYruH5/H0SI/tO/7nxQ9vfrl7/+H+7af//OHdu7+8+NP//PYnH1/86d+f/M/Hf3f/+t3bX//44/1Pb1+9efyzT397f/fiTy/uP939/OL7F29f/fz4v16/+vDTu5f/69VP796++Pv3L+7f/nj33y/+VP7+/c2/+fHTq9d/eXn/9uPdh093H5785Yr+8t3dm5ev/3z38dOTv9nA37z77/cf7j5+fPnpw6u3H9+/+/Dp5Q93b56C9L//x/cv7t5+uv90f/drCD7/j7/959tffv7hwdE/lVtY3794/+7jw19/CMmDFw+QL9vxb+P7F397+P9K+7fxYOvH+w93r3/9Lz4v9x9MVGFiz0w0YWJmJrowsWUmhjAxMhObMNEzE1OYaJmJXZiomYlDmCiZiXIRNi6hDZHfNczvIhK8hgleRIbXMMOLSPEapngROV7DHC8iyWuYgUVkeQ1fJEWkeQ3TvIg8r2GeV5HnNczzKvK8pHVc5HkJ87yKPC9hnleR5yXM8yryvIR5XkWelzDPq8jzEuZ5FXlewjyvIs9LmOdN5HkJ87yJPA/TvIk0DzOwiSxPvwhEkoc53kSOhyneRIqH2dfMfj00YQp5aMLkd/gBKNI7zO6eZ3dqIU/uNEx5bofPuuepHf5ge57ZYdb1PLHDV0fP8zp8//U8rdOeS57VYZkYeVKH5XTkOZ1uCoZI6jCrR57V6RZt5Gmd7jRHntfphnnkiZ3u+0ee2enny8hTO/3SG3lupx96W57cz30T92sm1vrnDyny92uodQm1nKC2pbZpRSHvSzbOPB9L3Vjm+bbUjWU25lI3ltnYl7qxzMax1I1FNuZlqVPKbJSlji+zUZfWUZCNttTxZevoSx1fto6xZIOtY607ztYxl7rKbB1r3XFmY607jmK1X5bWwWyUpQ48itVelzrwzEZbWgeLVV9aB7Mxlk4
@abraham
abraham / train-parking.text
Created May 11, 2017
Factorio Train Parking blueprint - 12 cars x 30 trains
View train-parking.text
0eNqd3e9uHMeZRvF74WfJmK6q/jO+lUWwsCXCS8CmDYky1jB070tFlEN76/Q85/2W7Ca/MNVdPWe6e978effjz5/uf/vw8Ph09/2fdw/vfn38ePf9f/159/Hhp8cffv7yf3v647f7u+/vHp7uf7l7c/f4wy9f/tmHHx5+vvv85u7h8f39/959v3z+15u7+8enh6eH+6///n//kz/++/HTLz/ef3j+F/zt3/n2RX9z99uvH5//Pb8+fvkPenbebvt365u7P57/0fr8j57/A94/fLh/9/Vf0T6/+X9u+8v9+PQs//Q/T2///adN5OPF3W6rPVe3XB25OnJ1zdWWq9tf6rtPH36/f0/men0x/3Gs+sTc87/0kv+lR/qXrvlfeo3/0lWcVcslZ8VptSzpCiz5Ciz5xlrFybrkO2sVZ+uSb61VnFrLGq7s2MXKbvHfOszJtad/axd/65H/reaMzffXECdXu4RL0MVFqy353yrO2JbvryHO2Jbvry5OrjbSlRUX2ZZ/cnVxcrV8f3VzcqX7q4urbMv3Vzcn1zX8W5u4bvX806uLM7bn+6uZgsv3VxMnV+/pyoqrbM8/vZo4Y3v66bWIy2HPd1cTZ2zP27CZkyuNw0Vct3r+6bWIM3bk+2sxXzrSOlzEdWvku2sRZ+zIP70WcXKNfH8t4uQa6f4SF9mRby9zaolvXkJNN5e4FA5RhuIrcr61xGm1hjtL7Ks13lfiPF3jXWX+y4dFKK6ra9yD5tDHG0qc+WvYguJzdY1LUOz7Nd5N5rq3hV+zFrHvt7gCzYV/i7eT+ZTawgZcxHV/iz+izGf/Fn5CNXGJ2uINZeJniz+hTP5t8aYyrbqF366auPbt8SeU+Qawx7vKfAfaW/jf39wazj+jxFm1x7vKfGPdw13VxfVvj3eVuQ+wx7vK3AnZw+7r4vq3x59U5lbQEX5SDXH9O+I9ZW6wHfEnlbkbeMS7yty6PML0G+L6d+TtJ87UI95V5u71EdbfENe/I/6kMs8EjnhXmaci13B
View Test.carbide.md
@abraham
abraham / v1.txt
Created Oct 19, 2015
reCAPTCHA API error response v1 vs v2
View v1.txt
false
invalid-site-private-key
@abraham
abraham / wkhtmltopdf.rb
Last active Aug 29, 2015
Brew formula to install wkhtmltopdf v0.9.9 with sha256
View wkhtmltopdf.rb
# SHA256 install formula to install wkhtmltopdf v0.9.9
# Source: https://gist.github.com/abraham/3fc0909958d90bdea89e
# Modified from https://raw.githubusercontent.com/mxcl/homebrew/6e2d550cf4961129a790bfb0973f8e88704f439d/Library/Formula/wkhtmltopdf.rb
require 'formula'
class Wkhtmltopdf < Formula
url 'http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9.tar.bz2'
homepage 'http://code.google.com/p/wkhtmltopdf/'
sha256 'e6311c0d398d50c757d43d34f1f63c4b33010441e97d07e92647542419ab1a8b'