Skip to content

Instantly share code, notes, and snippets.

View wizardishungry's full-sized avatar
🐫
Copyright 1987-2013, Larry Wall

Jon Williams wizardishungry

🐫
Copyright 1987-2013, Larry Wall
View GitHub Profile
@mlc
mlc / gist:5625204
Created May 22, 2013 04:15
reading my new citibike key
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<InfoDump application="NFC TagInfo" version="1.09c">
<Tag rfTechnology="Type V (ISO/IEC 15693 / Vicinity)">
<GeneralInformation>
<Value name="uid" description="UID">e0XXXXXXXXXXXXXX</Value>
<Value name="rfTechnology" description="RF technology">Type V (ISO/IEC 15693 / Vicinity)</Value>
<Value name="tagType" description="Tag type">SL2 ICS2001 (ICODE SLI)</Value>
<Value name="manufacturer" description="Manufacturer">NXP Semiconductors (Germany)</Value>
<Value name="afiString" description="Application family identifier (AFI)">all families and sub-families</Value>
<Value name="afi" description="AFI (numeric)">00</Value>
@willurd
willurd / web-servers.md
Last active August 27, 2025 14:48
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@nicky-zs
nicky-zs / memcpy.c
Created November 19, 2013 06:31
One way to solve the glibc compatibility problem. In my case, when building a program with libthrift.a on linux with glibc version 2.15, ld always links memcpy@GLIBC_2.14 which cannot be found on systems with glibc version < 2.14. So, use this file to define a symbol __wrap_memcpy and use -Wl,--wrap=memcpy to tell ld using this symbol when meeti…
#include <string.h>
void *__memcpy_glibc_2_2_5(void *, const void *, size_t);
asm(".symver __memcpy_glibc_2_2_5, memcpy@GLIBC_2.2.5");
void *__wrap_memcpy(void *dest, const void *src, size_t n)
{
return __memcpy_glibc_2_2_5(dest, src, n);
}
@t-io
t-io / osx_install.sh
Last active April 27, 2025 20:06
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@curtislacy
curtislacy / gist:8424181
Last active September 8, 2024 01:55
Bitcoin setup
# Create a new Ubuntu 13 instance.
# Get the tools and things as specified in https://gist.github.com/curtislacy/3905950/
sudo fdisk -l
sudo mkfs -t ext3 /dev/xvde1
sudo mkdir /var/lib/blockchain
sudo vi /etc/fstab
# Add:
# /dev/xvde1 /var/lib/blockchain ext3 defaults,noatime 0 2
sudo mount -a
@jart
jart / mtgox.php
Created March 12, 2014 16:05
Some Mt.Gox Source Code
<?php
namespace Money;
class Bitcoin {
#const BITCOIN_NODE = '173.224.125.222'; // w001.mo.us temporary
const BITCOIN_NODE = '50.97.137.37';
static private $pending = array();
public static function update() {
@saranrapjs
saranrapjs / varnish_test_cached.js
Last active August 29, 2015 13:57
PhantomJS script for deducing included resources using headless webkit, and determining which of them have been successfully cached by Varnish!
var system = require('system'),
fs = require("fs"),
CACHED_HEADER_NAME_REGEX = /X-Cache/,
CACHED_HEADER_VALUE_REGEX = /HIT/,
address,
parsedAddress,
cachedBytes = 0,
nocacheBytes= 0,
showAllURLS = false,
quiet = false,
@tadast
tadast / ssl_puma.sh
Last active August 19, 2025 20:15 — forked from trcarden/gist:3295935
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@despens
despens / blink_is_back.css
Created August 8, 2014 20:10
Blink tags are back, thanks to @thxlt
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active April 10, 2025 03:40
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server: