Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Masnick masnick

View GitHub Profile
@masnick
masnick / gitolite_hn.bash
Created Jun 20, 2011
Setting up gitolite (hn)
View gitolite_hn.bash
# Assuming Ubuntu 10.04 with git already installed.
#
# Make sure to secure your server: http://www.andrewault.net/2010/05/17/securing-an-ubuntu-server/
# These instructions are based on:
# http://sitaramc.github.com/gitolite/doc/1-INSTALL.html:
# First, get you id_rsa.pub onto the server as /tmp/YourName.pub
scp ~/ssh/id_rsa.pub you@git.you.com:/tmp/
@masnick
masnick / error.sh
Created Jul 29, 2011
ubuntu/prgmr locale error
View error.sh
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "en_US.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
@masnick
masnick / tarsnap.sh
Created Jul 29, 2011
Compiling tarsnap on Lion
View tarsnap.sh
# You'll need to install Xcode first.
# Download the tarsnap binary from https://www.tarsnap.com/download.html.
# After you untar the archive, cd into the folder and:
CC=/usr/bin/gcc-4.2 ./configure
CC=/usr/bin/gcc-4.2 make all install clean
View gist:1284889
sudo echo | sudo chmod -R -E ./*
@masnick
masnick / gist:1291199
Created Oct 16, 2011
jQuery inject one-liner
View gist:1291199
var a=document.createElement("script");a.type="text/javascript";a.async=true;a.src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js";var b=document.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);
@masnick
masnick / gist:1654182
Created Jan 21, 2012
Amazon S3 bucket policy for www.maxmasnick.com
View gist:1654182
{
"Version": "2008-10-17",
"Id": "b2cc31d0-cc91-4285-a658-473099d2c867",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
View gist:1989052
sudo mount -t vboxsf -o uid=1000,gid=1000 osx /mnt/MOUNTNAME
@masnick
masnick / bags.md
Created Sep 3, 2012
Bags for charity
View bags.md

Bags for charity!

You pay me $25, I send you a bag and donate the rest to charity.

View gist:3958250
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.12 (Darwin)
mQINBFCKbYMBEAC+5K7quNOSFp5QyJAZWvFIkKeoQd+x4AnTy8iqq8Y9kUnuG5S+
jaPHMicTJV2yrIBkR7/31uPr88p+32J9mgOUREF+TAEGGoDIpEizFokXN4//oUOy
xQ8QayCXYBr0vYCsqAfCS1pkUDAp1zYkQx/suy81BkBPujQSVYUdqnoQ6bBYgXwB
w3CZFgomBGQyzPVLe2Bx696IySg+HCi4ZlZY7qrZTebfap2gqJsTnq7Qq9rWuC+i
9fxn1d/lJgexSrq/mge2Tr3s/tunE4RwAFHMn4pmUo9QBlZ908w+Nr4QtheKlVxl
T9V0+WlZVniHwXxrMmNb0cAYesKiex5ciCVOijoA9CAh+58C+A3tnM+6HOIR2GOi
dZSbGvlcZ7GxVBb6xMxuQZWz9A2EfZlEAaUS0Cl4zwuAVkazU627cTKKcHt8Tje9
@masnick
masnick / pgp.md
Created Oct 26, 2012
PGP cheat sheet
View pgp.md

Install GPG (Mac only)

brew install gpg

Sending encrypted text

  1. Save your secret stuff to encrypted.txt.

  2. Add my public key to your gpg keyring: