Skip to content

Instantly share code, notes, and snippets.

View marothstein's full-sized avatar

Matt Rothstein marothstein

View GitHub Profile
@hausen
hausen / gist:9501041
Last active August 29, 2015 13:57
"Fixing" xkcd 1340 (or making the most redonkulous clock ever)

"Fixing" xkcd 1340 (or making the most redonkulous clock ever)

Update: feeling adventurous? Clone or fork the xkcd clock! If you just want to see it in action or get a glimpse of how it works, keep reading.

Problem

The date in [xkcd's comic number 1340][1] [does not change][2].

@marothstein
marothstein / GetCardSwipe.js
Last active September 30, 2022 18:00
Basic implementation of methods needed to receive swiped credit card data with javascript.
/*
* Basic implementation of methods needed to receive swiped credit card data with javascript.
*
* NOTE: PCI compliance specifies that card data must never be stored in an unencrypted manner, and
* only certain pieces of card data can be stored persistently. Ensure that output logging is NOT
* stored persistently when using this file, as it contains console.log messages that are intended
* to educate the user, and these messages contain data that may compromise your PCI compliance posture.
*
* If you choose to use any of this code with real credit card data, it is your responsibility
* to remove all log statements, output, or other code that may serve to persist offending information.
@madrobby
madrobby / gist:5489174
Created April 30, 2013 14:43
Install Phantom.js on Ubuntu 10.04 and tweak for better rendering quality.
sudo apt-get update
sudo apt-get install libfreetype6 libfreetype6-dev libfontconfig
# /etc/apt/sources.list should contain these:
# deb http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid multiverse
# deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
sudo echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
@dannguyen
dannguyen / ec2-centos-ruby-rvm-nginx-passenger.md
Last active November 27, 2023 15:43
Setting up Ruby 1.9.3 stable, RVM, nginx, passenger on Amazon Linux AMI (CentOS)

Ruby 1.9.3 stable, RVM, nginx, passenger on Amazon Linux AMI (CentOS, 03-2013)

This combines the instructions on a few different tutorials:

@digitaljhelms
digitaljhelms / gist:4287848
Last active May 17, 2024 09:50
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@Incognito
Incognito / errorlog.sql
Created December 6, 2011 15:49
Psudo-error loggging JS thinger.
CREATE TABLE errorLog (
Timestamp,
IP,
Line,
ErrorMessage,
URL,
Cookies,
UserAgent,
Plugins,
@glenbot
glenbot / Git Issue Export for Pivotal
Created January 6, 2011 23:57
Export your open issues in github to a pivotal tracker friendly csv for import, requires github2 python api-client
import csv
from github2.client import Github
# api settings for github
git_username = 'your_git_username'
git_api_token = 'your_git_api_token'
git_repo = 'username/repo_name'
# import all issues as this story type
pivotal_story_type = 'Bug'
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support