Skip to content

Instantly share code, notes, and snippets.

View glesperance's full-sized avatar

Gabriel Lesperance glesperance

View GitHub Profile

Linear Congruential Generator for Efficient Shuffle of Finite Sequence

A CodePen by Gabriel Lesperance.

@glesperance
glesperance / index.haml
Created June 7, 2013 19:46
Basic Highlighting Done
- content = "Lorem ipsum @dolor sit amet, consectetur @adipiscing elit. Sed convallis egestas leo. Nulla eget vehicula dui. Praesent vulputate urna #imperdiet, #volutpat #neque #vel, #interdum neque. Nullam vitae @fringilla #lorem."
%h1 RICH TEXT AREA PROTOTYPE
.content
.rich-text-area
.mirror-container
.mirror~ content
%textarea~ content
.auto-complete
@glesperance
glesperance / 00.howto_install_phantomjs.md
Created December 2, 2015 19:19 — forked from julionc/00.howto_install_phantomjs.md
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@glesperance
glesperance / gist:d226c67856625a677f5a
Last active August 29, 2015 14:24
WhoSampled TAG
<script type="text/javascript">
var wb = window.wb || (window.wb = {});
wb.q || (wb.q = []);
wb.q.push(['addGrid', {siteId: '283045', id : "wb-ad-grid"}])
</script>
<script src="https://d2szg1g41jt3pq.cloudfront.net/" async="true"></script>
<div style="display: none; font-family: 'Open Sans', sans-serif; font-size: 20px; font-weight: 400; padding: 4px 0px 3px 38px; margin: 20px 0px 0px; background: url(https://d2szg1g41jt3pq.cloudfront.net/assets/wavo-boost-icon.png) 0% 50% / contain no-repeat;" data-wb-sw="wb-ad-grid">TOP TRENDING MUSIC</div>
<div id="wb-ad-grid" style="margin: 10px -10px 0 -10px !important"></div>
/**
@license html2canvas v0.34 <http://html2canvas.hertzen.com>
Copyright (c) 2011 Niklas von Hertzen. All rights reserved.
http://www.twitter.com/niklasvh
Released under MIT License
*/
(function(window, document, undefined){
/*
html2canvas v0.34 <http://html2canvas.hertzen.com>
/*
Objects can have the following parameters:
color: '#fff' by default
impassable: true if it blocks the player from movement (false by default)
onCollision: function (player, game) called when player moves over the object
onPickUp: function (player, game) called when player picks up the item
symbol: Unicode character representing the object
type: 'item' or null
*/
/*****************
* bossFight.js *
*****************
*
* NO FARTHER, DR. EVAL!!!!
* YOU WILL NOT GET OUT OF HERE ALIVE!!!!
* IT'S TIME YOU SEE MY TRUE FORM!!!!
* FACE MY ROBOT WRATH!!!!!
*/
/**********************
* superDrEvalBros.js *
**********************
*
* You're still here?! Well, Dr. Eval, let's see
* how well you can operate with one less dimension.
*
* Give up now. Unless you have a magic mushroom
* up your sleeve, it's all over.
*/
/***************
* pointers.js *
***************
*
* You! How are you still alive?
*
* Well, no matter. Good luck getting through this
* maze of rooms - you'll never see me or the Algorithm again!
*/
/*************
* lasers.js *
*************
*
* Time to unleash the killer lasers! Each laser will kill you
* unless you have the appropriate color. Too bad you can't
* see which color corresponds to which laser!
*/
function getRandomInt(min, max) {