Skip to content

Instantly share code, notes, and snippets.

View shaneriley's full-sized avatar

Shane Riley shaneriley

View GitHub Profile
@shaneriley
shaneriley / snippet.js
Created August 6, 2020 19:21
HG101 modal image slideshow
var $ = jQuery;
var $galleryThumbnails = $('.left-sidebar-gallery')
$galleryThumbnails.off('.gallery');
$('#gallery_modal').off('.gallery').remove();
$(document).off('.gallery');
var slidesCount = $galleryThumbnails.find('a').length;
var $modal = $('<div />', {
id: 'gallery_modal',
@shaneriley
shaneriley / page.html
Created November 24, 2019 02:17
RFGen collection FAQ
<td class="normaltext"><h2>General</h2>
<details open="">
<summary>What is the RF Generation Collection Software used for?</summary>
<p>The software is intended to allow video game collectors everywhere to have a place on the web to keep track of their video game collections. Not only can collectors keep a running tally of the number of cartridges, boxes, and manuals they own of each game in our ever-growing database, but they can also show off their collections to other collectors around the globe without having to send giant Word or Excel documents to one another.</p>
<p>Additionally, the software allows collectors to see what games other site members are interested in buying, trading, and selling. Through the message board Personal Messaging system, collectors can find other collectors in their area and arrange trades, sales, and purchases easily, while building a strong community of collectors and gamers alike.</p>
</details>
<details>
function throttle(delay, no_trailing, callback, debounce_mode) {
var timeout_id,
last_exec = 0;
if ( typeof no_trailing !== "boolean" ) {
debounce_mode = callback;
callback = no_trailing;
no_trailing = undefined;
}
@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.
@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 / what.js
Created August 25, 2016 23:59
frontenddevelopersayswhat
[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(+{}+[])[+!![]]+([]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[

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:

sudo nmap -sP 10.0.1.0/24 | awk '/^Nmap/ { printf $5" " } /MAC/ { print }' - | grep Raspberry
@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
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