Skip to content

Instantly share code, notes, and snippets.

View shaneriley's full-sized avatar

Shane Riley shaneriley

View GitHub Profile
@shaneriley
shaneriley / gist:ab945b15084f47056ad5
Created March 23, 2015 19:54
State select element
<select name="state">
<option>AK</option>
<option>AL</option>
<option>AR</option>
<option>AZ</option>
<option>CA</option>
<option>CO</option>
<option>CT</option>
<option>DC</option>
<option>DE</option>
@shaneriley
shaneriley / move_demo.p8
Last active May 22, 2018 20:14
PICO-8 Movement Demo
pico-8 cartridge // http://www.pico-8.com
version 4
__lua__
player = {}
player.x = 5
player.y = 5
player.sprite = 0
player.speed = 2
function move()
console.clog = function() {
var format = "font: normal 18px 'Comic Sans MS', Chalkboard; color: purple;";
if (arguments.length > 1) {
console.log("%c" + arguments[0], format, [].slice.call(arguments, 1));
}
else {
console.log("%c" + arguments[0], format);
}
};
module UiHelper
def dummy_image(width, height, background=nil, text=nil)
background = background ? "/#{background}" : ""
text = text ? "/#{text}" : ""
content_tag :img, nil, alt: "", "data-src" => "/placeholder/#{width}x#{height}#{background}#{text}"
end
def lorem_paragraph(quantity = 3)
Faker::Lorem.paragraphs(quantity).join
end
@shaneriley
shaneriley / optimize.sh
Created April 7, 2016 14:28 — forked from ryansully/optimize.sh
image optimization script (pngcrush & jpegtran)
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
for png in `find $1 -iname "*.png"`; do
echo "crushing $png ..."
pngcrush -rem alla -reduce -brute "$png" temp.png
sudo nmap -sP 10.0.1.0/24 | awk '/^Nmap/ { printf $5" " } /MAC/ { print }' - | grep Raspberry

Keybase proof

I hereby claim:

  • I am shaneriley on github.
  • I am shaneriley (https://keybase.io/shaneriley) on keybase.
  • I have a public key whose fingerprint is 0C11 260D 4BC2 7784 5025 E030 0B35 879A 83D3 EED3

To claim this, I am signing this object:

@shaneriley
shaneriley / what.js
Created August 25, 2016 23:59
frontenddevelopersayswhat
[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[
@shaneriley
shaneriley / crush_it.sh
Created October 19, 2016 18:58
Image optimization
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
for png in `find $1 -iname "*.png"`; do
echo "crushing $png ..."
pngcrush -rem alla -reduce -brute "$png" temp.png
@shaneriley
shaneriley / OFF-1993.TXT
Created January 20, 2017 10:30
WOTC Emails
(102092 Mar 26 1994 official.answers.thru.12.3)
<------------------------------------------------------------------------------->
N O T I C E ! ! ! ! ! ! ! ! ! ! !
This is NOT the FAQ list. This is a compilation of other answers from the
Snark (David Howell) and other persons of note, and are more of less official.
Use at you own risk.