Skip to content

Instantly share code, notes, and snippets.

View rviscomi's full-sized avatar

Rick Viscomi rviscomi

View GitHub Profile
@rviscomi
rviscomi / lorem-ipsum.js
Created December 15, 2011 03:06
JavaScript Lorem Ipsum Generator
/**
* @fileOverview Generates "Lorem ipsum" style text.
* @author rviscomi@gmail.com Rick Viscomi,
* tinsley@tinsology.net Mathew Tinsley
* @version 1.0
*/
/**
* Copyright (c) 2009, Mathew Tinsley (tinsley@tinsology.net)
* All rights reserved.
@rviscomi
rviscomi / LICENSE.txt
Created February 21, 2012 02:58 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@rviscomi
rviscomi / timedChunk.js
Created September 5, 2012 19:00
Timed chunk
/*! Copyright 2009 Nicholas C. Zakas. All rights reserved. MIT Licensed */
/**
* Processes each item in "items" at most 50ms at a time with a sleep of 25ms.
* By limiting the amount of time spent in a loop, there is no lock on the UI thread.
*
* Calls "process" in "context" for each item in "items".
* After each item has been processed, "callback" is called with the original array.
*
* Some modifications to Zakas's code:
* * added delay parameter to control how long to sleep
@rviscomi
rviscomi / Auto GA Event Tracking.js
Created September 6, 2012 08:43
Automatically trigger Google Analytics events by setting data attributes on HTML elements to track.
/* Custom event-tracker wrapper function. */
function trackEvent(category, action) {
if (!category || !action) {
console.warn('trackEvent takes a category and an action.');
}
else {
_gaq.push(['_trackEvent'].concat([].slice.call(arguments)));
}
}
@rviscomi
rviscomi / Ingress Intel Map Permalink
Last active December 10, 2015 03:29
Produces a permalink in the Ingress Intel Map comm chat so that others can go directly to a map centered on your current coordinates and zoom level.
@rviscomi
rviscomi / gist:4429450
Created January 1, 2013 19:18
Ingress Day #3
Wy1dPlstXTwNCj4rKysrKysrK1s8KysrKysrKys+LV08KysrLg0KPisrKytbPCsrKys+LV08KysuDQo+KysrK1s8LS0tLT4tXTwrKy4NCj4rK1s8LS0+LV08LS4NCisrKy4NCj4rKysrWzwtLS0tPi1dPCsrKy4NCj4rK1s8LS0+LV08LS0uDQo+KysrKytbPCsrKysrPi1dPCsrLg0K
@rviscomi
rviscomi / meetup-raffle.js
Created February 10, 2014 22:19
Selecting a Meetup attendee at random
$('#rsvp-list li').eq(Math.floor(Math.random()*149)+1).find('a').text()
[locations]
1=Public_Dulles
default=Public_Dulles
[Public_Dulles]
1=WPT_Dulles_Chrome
label=”Dulles, VA”
group=Public
[WPT_Dulles_Chrome]
{
"data": {
"repository": {
"owner": {
"login": "rviscomi",
"avatarURL": "https://avatars3.githubusercontent.com/u/1120896?v=3"
},
"name": "red-dwarf",
"description": "Google Maps heatmap of GitHub repository stargazers",
"stargazers": {
@rviscomi
rviscomi / gist:700f8cc86490f364843f3feaaecbff89
Last active April 3, 2017 20:55
WPT custom metrics script for third party libs
[lib-version]
return '2.8.2';
[3pl]
var thirdParties = [];
function addThirdParty(name, version) {
if (!name) {
return;
}