Skip to content

Instantly share code, notes, and snippets.

Will Franzen wtfaremyinitials

Block or report user

Report or block wtfaremyinitials

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
@wtfaremyinitials
wtfaremyinitials / svg.css
Created Jul 21, 2015
Responsive SVG fix for IE
View svg.css
img[src$=".svg"] {
width: 100%;
}
@wtfaremyinitials
wtfaremyinitials / of.jxa
Created Aug 9, 2015
Quickly add a task to OmniFocus from the CLI
View of.jxa
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
if(argv.length == 0) {
console.log('Usage: of [ transport text ]')
} else {
Application('OmniFocus').parseTasksInto(Application('OmniFocus').documents[0], { asSingleTask: true, withTransportText: argv.join(' ') })
ObjC.import("stdlib")
$.exit(0)
}
}
@wtfaremyinitials
wtfaremyinitials / media.css
Created Aug 13, 2015
Access CSS media queries in JavaScript
View media.css
#media::before {
content: 'desktop';
}
@media (max-width: 500px) {
#media::before {
content: 'mobile';
}
}
@wtfaremyinitials
wtfaremyinitials / .hotel.dev extension.md
Last active Mar 9, 2016
Chrome extension for hotel.dev
View .hotel.dev extension.md
@wtfaremyinitials
wtfaremyinitials / type.css
Created May 2, 2016
Basic Responsive Typography
View type.css
/* https://twitter.com/Dmitry_Zubkov/status/726555594635808768 */
:root {
font-size calc(1vw + 1vh + .5vmin);
}
body {
font 1em/1.6rem sans-serif;
}
@wtfaremyinitials
wtfaremyinitials / promise-polyfill.js
Last active May 7, 2016
Feature detecting Promise polyfill
View promise-polyfill.js
if(!window.Promise) {
var req = new XMLHttpRequest();
req.open('GET', 'https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise', false);
req.send();
eval(req.responseText);
}
@wtfaremyinitials
wtfaremyinitials / addition.js
Created May 20, 2016
Addition with neural networks
View addition.js
var brain = require('brain.js')
var net = new brain.NeuralNetwork();
console.log('Generating training data...');
var data = [];
for(var i=0; i<100000; i++) {
var obj = {};
obj.input = [];
obj.input[0] = Math.random();
obj.input[1] = Math.random();
@wtfaremyinitials
wtfaremyinitials / autorun.sh
Created Jun 8, 2016
Transcend WiFi SD Card telnet
View autorun.sh
telnetd -l /bin/sh &
@wtfaremyinitials
wtfaremyinitials / copy.js
Created Apr 23, 2015
Javascript copy to clipboard
View copy.js
function copytext(text) {
var textField = document.createElement('textarea');
textField.innerText = text;
document.body.appendChild(textField);
textField.select();
document.execCommand('copy');
textField.remove();
}
// credit to reddit.com/u/liamht
@wtfaremyinitials
wtfaremyinitials / keybase.md
Created Jul 11, 2016
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

To claim this, I am signing this object:

You can’t perform that action at this time.