Skip to content

Instantly share code, notes, and snippets.

View johnantoni's full-sized avatar

John Griffiths johnantoni

  • Toronto, Ontario
View GitHub Profile
@johnantoni
johnantoni / pinit.html.haml
Created February 16, 2012 15:41
https pin-it pinterest code
:javascript
(function() {
window.PinIt = window.PinIt || { loaded:false };
if (window.PinIt.loaded) return;
window.PinIt.loaded = true;
function async_load(){
var s = document.createElement("script");
s.type = "text/javascript";
s.async = true;
s.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'assets.pinterest.com/js/pinit.js';
@johnantoni
johnantoni / Facebook like hide
Created March 7, 2012 23:04
Facebook like hack to hide the like count
.fb_like #fb
width: 48px
.fb_edge_widget_with_comment iframe
width: 48px !important
.fb_edge_comment_widget
&.fb_iframe_widget iframe
width: 401px !important
@johnantoni
johnantoni / gist:2020256
Created March 12, 2012 06:19
nginx install via sm
# on debian
sm nginx install
# need sudo rights to symlink config to /etc
sudo ~/.sm/bin/sm nginx configure system
sm nginx server add mark1_deployer
chmod go+rx /home/deployer
@johnantoni
johnantoni / gist:2048193
Created March 16, 2012 02:42
my bdsm setup nginx
# install as root
apt-get update
apt-get install aptitude
aptitude update
aptitude install sudo build-essential git-core screen zsh libpcre3 libpcre3-dev libssl-dev
# install ruby
bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
@johnantoni
johnantoni / gist:2310617
Created April 5, 2012 12:23
nexus s i9020a flash
# http://code.google.com/android/nexus/images.html#soju
# specifically "soju"
# download, untar
# copy fastboot-mac files into dir
# unlock bootloader (wipes all content on phone)
./fastboot-mac oem unlock
# perform updating process
./fastboot-mac flash bootloader bootloader-crespo-i9020xxkl1.img
@johnantoni
johnantoni / mvim
Created April 10, 2012 20:34
mvim script for macvim
#!/bin/sh
#
# This shell script passes all its arguments to the binary inside the
# MacVim.app application bundle. If you make links to this script as view,
# gvim, etc., then it will peek at the name used to call it and set options
# appropriately.
#
# Based on a script by Wout Mertens and suggestions from Laurent Bihanic. This
# version is the fault of Benji Fisher, 16 May 2005 (with modifications by Nico
# Weber and Bjorn Winckler, Aug 13 2007).
@johnantoni
johnantoni / linode_security.sh
Created April 18, 2012 13:32
Linode Stack Script - Security by Xenofox
#!/bin/bash
#
# Security StackScript
# By Donald von Stufft <donald.stufft@gmail.com>
#
# <udf name=&quot;user_name&quot; label=&quot;Unprivileged User Account&quot; />
# <udf name=&quot;user_password&quot; label=&quot;Unprivileged User Password&quot; />
# <udf name=&quot;user_sshkey&quot; label=&quot;Public Key for User&quot; default=&quot;&quot; />
#
@johnantoni
johnantoni / gemfile.heroku
Created April 19, 2012 16:55
gemfile changes to support heroku deploy
# Heroku's rubygems is too old for hoe 2.9.1 as of 28 Mar 2011
gem 'hoe', '~> 1.5.1'
# figures
gem "heroku"
# will need some sort of web server
gem "thin"
@johnantoni
johnantoni / rvm_ruby_zlib
Created April 20, 2012 05:27
rvm install with zlib + ruby
# tested on debian 6 32bit and working
# install
curl -L get.rvm.io | bash -s stable
# zlib
rvm pkg install zlib
@johnantoni
johnantoni / photoshop lesson 1
Created May 4, 2012 15:24
photoshop lesson 1
color correction
eyedropper, 3 - one for light, medium, dark
find whitest spot, a lightsource
darkest spot, corner
then click colour balance to toggle
use histogram to bring up tones
or levels to bring up tones
select colour dropdown and then can target a specific tone, drop the
red