Skip to content

Instantly share code, notes, and snippets.

View Yuffster's full-sized avatar
🕳️
ᕕ( ᐛ ) ᕗ

Michelle Steigerwalt Yuffster

🕳️
ᕕ( ᐛ ) ᕗ
View GitHub Profile
#!/usr/bin/env perl
#
# Copyright (c) 2009 Michelle Steigerwalt <msteigerwalt.com>
# All rights reserved.
#
# Handy-dandy tea brewing timer for Maccies and Irssi.
#
# OSX Requirements:
#
# Uses Growl for messaging. Requires the Growl Perl modules. This could be
/**
* INSTALLATION:
*
* All these modules are core modules except for redis. To install that, just
* type 'npm install redis'.
*
* To run, 'node app.js <port number>'.
*
* USAGE:
*
@Yuffster
Yuffster / app.rb
Created May 26, 2012 09:39
Continuous Integration Server in < 20 Lines
require 'rubygems'
require 'sinatra'
require 'json'
require 'logger'
before do
#only allow access to GitHub.
ips = ['207.97.227.253', '50.57.128.197', '108.171.174.178'];
halt 404, "D:&lt;" unless ips.find_index(@env['REMOTE_ADDR'])>=0
end
@jonathantneal
jonathantneal / matchesSelector.polyfill.js
Created July 6, 2012 21:51
matchesSelector Polyfill // returns whether an element matches a selector
this.Element && function(ElementPrototype) {
ElementPrototype.matchesSelector = ElementPrototype.matchesSelector ||
ElementPrototype.mozMatchesSelector ||
ElementPrototype.msMatchesSelector ||
ElementPrototype.oMatchesSelector ||
ElementPrototype.webkitMatchesSelector ||
function (selector) {
var node = this, nodes = (node.parentNode || node.document).querySelectorAll(selector), i = -1;
while (nodes[++i] && nodes[i] != node);
@Yuffster
Yuffster / Element.Data.js
Created July 25, 2012 05:48
Data attribute API extension for MooTools.
Element.implement({
getData: function() {
var data = {}, attrs = this.attributes;
for (var i=0; i<attrs.length; i++){
k = attrs.item(i).nodeName;
if (k.match(/^data-/)) data[k.replace(/^data-/, '')] = attrs.item(i).nodeValue;
} return data;
},
@jo
jo / js-crypto-libraries.md
Last active October 9, 2025 13:57
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@Zolomon
Zolomon / rearrange.hs
Last active September 21, 2024 04:15
Calculate best rearrange in Discworld MUD.
module Rearrange where
import Control.Applicative
import Data.List
main :: IO ()
main = do
putStrLn $ show (getMaxStats maPo)
data Stats = Stats { str :: Int,
@keis
keis / coro.py
Created April 14, 2014 08:27
asyncio examples
import asyncio
@asyncio.coroutine
def waiting(r):
print("hello from waiting -", r)
yield from asyncio.sleep(2)
print("bye from waiting -", r)
return r
@kyledrake
kyledrake / ferengi-plan.txt
Last active July 23, 2025 20:52
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {

Git Quick Reference

Git is awesome, but a lot of the time, I just need a quick reference for which commands to use in which situations. Here Goes!


Basics

git init