Skip to content

Instantly share code, notes, and snippets.

@pthrasher
pthrasher / crosshatch.glsl
Last active August 9, 2024 13:11 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
uniform vec2 resolution;
@pthrasher
pthrasher / undulating burn out.glsl
Last active August 9, 2024 13:11 — forked from glslioadmin/TEMPLATE.glsl
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
#define M_PI 3.14159265358979323846 /* pi */
// General parameters
uniform sampler2D from;
uniform sampler2D to;
uniform float progress;
@pthrasher
pthrasher / fridays_of.py
Created December 12, 2014 15:12
Usage: python fridays_of.py <date> <num days to count back>
# Find all friday the 13th's of the last 1000 days
# python fridays_of.py 13 1000
import datetime
import sys
one_day = datetime.timedelta(days=1)
def is_fri(dt):
return dt.weekday() == 4
@pthrasher
pthrasher / gen-keys-button.png
Last active August 29, 2015 14:06
How-To: Sign-up, and generate sharing keys for lastpass.com
gen-keys-button.png
@pthrasher
pthrasher / no-ie8.mkd
Created May 6, 2014 18:53
Why not to support IE8

Stolen from: http://github.hubspot.com/tether/overview/why_we_dont_support_ie_8/

Why we don't support IE 8

We've been living in 2007 for a while now, pretending that new browser features don't exist because they aren't in IE8. You might not even know about some of these features, or think they are only enabled by jQuery or underscore, simply because it hasn't been an option to rely upon them.

Here is the list of features you don't have if you choose to support IE 8:

Keybase proof

I hereby claim:

  • I am pthrasher on github.
  • I am pthrasher (https://keybase.io/pthrasher) on keybase.
  • I have the public key with fingerprint F8C3 CF8A 6713 1401 2E2C  BE6E 7DFE C26E A859 BFB8

To claim this, I am signing this object:

_ = require 'underscore'
fs = require 'fs'
rawText = fs.readFileSync 'alice.txt', 'utf8'
getWords = (text) ->
words = text.toLowerCase().match /\b[a-z]{4,}\b/g
_.uniq words
genAndRoll = (words) ->
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
/**
* This sample is about how to implement a queue in c
*
* Type of item is int
* Add item to head, tail or any position
* Get item from head, tail or any position
* Get and remove item from head, tail or any position
@pthrasher
pthrasher / ff-tenets.mkd
Created January 28, 2013 15:35
This is what it takes for a flag football team to be successful.

Flag Football Tenets of Success

  1. No negative or bad attitudes.
  2. Players who desire to be a part of a winning team.
  3. Humility -- from EVERYONE.
  4. Easy acceptance of criticism. (even the best player on the team is going to routinely make mistakes)
  5. Practice.
  6. Practice.
@pthrasher
pthrasher / README.md
Created December 10, 2012 23:07 — forked from mbostock/.block
Contour Plot