Skip to content

Instantly share code, notes, and snippets.

View mike-engel's full-sized avatar
👻
Writing code, maybe ¯\_(ツ)_/¯

Mike Engel mike-engel

👻
Writing code, maybe ¯\_(ツ)_/¯
View GitHub Profile
BEGIN MESSAGE.
HW7OahaEw877r6h sP48wxWfDYrV2s1 nFFcnRXKRcChsSf IhHyNj2Wmv9iu3F
PI1ScpjDwOAltVB rNZBlVhhTFpTCKq 6Xr2MZHgg6IlHPL 7uxeXIRR3LfnydT
js9oFUGDJO2bs8H jicFzJ5vQihOziR 7Nv3RYTHckPD3YZ 6YPkgehDNBcwqVx
L4Z5e1gzqMtfENQ XaQfnZXH9asBL2k s4zSu7tiSkCT.
END MESSAGE.
user www;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
events {
worker_connections 1024;
}
http {
module.exports = {
config: {
fontSize: 12,
fontFamily: "'Source Code Pro for Powerline', 'Source Code Pro', 'Input', 'Menlo', 'Consolas', Monospace",
cursorColor: '#F81CE5',
cursorShape: 'BLOCK',
@mike-engel
mike-engel / chaos.js
Created July 2, 2017 06:14
A stupid javascript function to bring chaos to any webpage
Array.prototype.slice.call(document.querySelectorAll('*')).forEach(el => {
el.style.position = 'fixed'
el.style.top = Math.random() * window.innerHeight + 'px'
el.style.left = Math.random() * window.innerWidth + 'px'
})
@mike-engel
mike-engel / lib.rs
Created April 2, 2017 19:26
lifetimes are hard :(
#[macro_use]
extern crate lazy_static;
use std::fs::File;
use std::io::prelude::*;
use std::collections::HashSet;
use std::iter::FromIterator;
lazy_static! {
static ref PASSWORDS: HashSet<&'static str> = {
#!/usr/local/bin/ruby
require 'rubygems'
require 'colored'
print 'Colors are'.bold
print ' black'.black
print ' blue'.blue
print ' cyan'.cyan
print ' green'.green
print ' magenta'.magenta
@mike-engel
mike-engel / pfBranchingStrategies.md
Created November 9, 2015 02:39
Two possible branching strategies for picturefill.

Two possible branching strategies for Picturefill

Right now, we have a fairly simple, but sometimes hard to describe branching strategy for picturefill. I've outlined the basic process which will hopefully clear up any questions.

current version

A simpler version

Here is a simple version, which more closely aligns with the github flow. All new work gets merged into master and released as a new version when it's ready. No more waiting.

@mike-engel
mike-engel / responsiveStringGenerator.js
Last active October 15, 2015 02:58
Generate a responsive image string based on a filename and some widths
function generateResponsiveString (filename, widths, isFallback) {
'use strict'
const urlPrefix = 'https://res.cloudinary.com/beardfury/image/upload/c_scale,w_'
let fullString = ''
if (isFallback) {
return urlPrefix + widths + filename
}
@mike-engel
mike-engel / templateImages.ejs
Last active October 15, 2015 02:34
Using responsive images with the cloud in a template
<div class="portfolio-item-1">
<img src="<%= responsiveImageString('v1444865801/forest.jpg', 1000, true) %>"
srcset="<%= responsiveImageString('v1444865801/forest.jpg', [320, 768, 1024, 5000]) %>"
sizes="(min-width: 1024px) 50vw, 100vw)
alt="Green forest scene">
</div>