Skip to content

Instantly share code, notes, and snippets.

View ssokolow's full-sized avatar

Stephan Sokolow ssokolow

View GitHub Profile
@arturfsousa
arturfsousa / barcode_template.html
Created September 13, 2012 18:56 — forked from seocam/barcode_template.html
Generate a interleaved 2 of 5 barcode in pure HTML and CSS (tested only in Firefox and Chrome)
<html>
<head>
<style>
#barcode {height: 60px;}
#barcode span {margin: 0;padding-bottom: 34px;height: 16px;}
.n {border-left: 1px solid;}
.w {border-left: 3px solid;}
.n, .w {border-color: #000;}
.s {border-color: #fff;}
</style>
@incompl
incompl / gist:3819571
Last active March 19, 2023 16:05
Git needs help

The git command-line interface sucks

When I use git, I'm scared I'll break something. I just talked to an open source celebrity who has used git for 3-4 years who avoids using the CLI because he's afraid he'll break something, and uses Tower when possible. I recently had a client accidentally delete their work because they didn't understand git. My fear of breaking something is well-founded.

You can't put a price on the confidence that source control is supposed to give you. That confidence suffers when people are afraid of causing irreparable damage during normal use.

This article lists a few ideas on what git can do to improve.

A Controlled Vocabulary

@zoqaeski
zoqaeski / custom
Created October 12, 2012 18:14
xkbcomp keyboard layout dump
// $XDG_CONFIG_HOME/xkb/symbols/custom
// Makes ALT + CAPS_LOCK act as 3rd level switch
// Works sporadically
partial modifier_keys
xkb_symbols "alt_caps_mode_switch" {
key <CAPS> {
type[Group1]="PC_ALT_LEVEL2",
[ Caps_Lock, ISO_Level3_Shift ]
};
gnome-cups-manager
------------------
Once upon a time there was a printer who lived in the woods. He was a
lonely printer, because nobody knew how to configure him. He hoped
and hoped for someone to play with.
One day, the wind passed by the printer's cottage. "Whoosh," said the
wind. The printer became excited. Maybe the wind would be his
friend!
@jollytoad
jollytoad / gist:4201905
Created December 4, 2012 08:44
Read a File using a FileReader returning a jQuery promise
function readFile(file) {
var reader = new FileReader();
var deferred = $.Deferred();
reader.onload = function(event) {
deferred.resolve(event.target.result);
};
reader.onerror = function() {
deferred.reject(this);
@quchen
quchen / trolling_haskell
Last active February 24, 2024 01:30
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now
@xguse
xguse / noise.sh
Last active November 21, 2022 12:14 — forked from rsvp/noise.sh
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-10-04
#
# _______________| noise : ambient Brown noise generator (cf. white noise).
#
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
#
# Dependencies: play (from sox package)
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
#!/bin/bash
trap 'rm -rf "$tempdir"' EXIT
tempdir=$(mktemp -d)
cd "$tempdir" || exit 1
printf '%s\n' \
'(return 2>/dev/null); echo $?' \
> bash_return
@0xabad1dea
0xabad1dea / rsa-not-buying-it.md
Last active May 4, 2022 21:59
Sorry, RSA, I'm just not buying it

Sorry, RSA, I'm just not buying it

I want to be extremely clear about three things. First, this is my personal opinion – insert full standard disclaimer. Second, this is not a condemnation of everyone at RSA, present and past. I assume most of them are pretty okay, and that the problem is confined to a few specific points in the company. However, “unknown problem people making major decisions at RSA” is a bit unwieldy, so I will just say RSA. Third, I'm not calling for a total boycott on RSA. I work almost literally across the street from them and I don’t want to get beat up by roving gangs of cryptographers at the local Chipotle.

RSA's denial published last night is utter codswallop that denies pretty much everything in the world except the actual allegations put forth by Reuters and hinted at for months by [other sources](http://li