Skip to content

Instantly share code, notes, and snippets.

Andy Fowler andyfowler

Block or report user

Report or block andyfowler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
andyfowler / Vagrantfile
Created Oct 4, 2011
cpu_count in Vagrant
View Vagrantfile do |config| = "natty"
config.vm.customize do |vm|
vm.memory_size = 2048
vm.cpu_count = 2 # this.
config.vm.share_folder 'aptcache', '/var/cache/apt', '/var/cache/apt' # and this
andyfowler / .vimrc
Created Sep 5, 2011
Swap iTerm2 cursors in vim insert mode when using tmux
View .vimrc
" tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence
if exists('$TMUX')
let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\"
let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\"
let &t_SI = "\<Esc>]50;CursorShape=1\x7"
let &t_EI = "\<Esc>]50;CursorShape=0\x7"
andyfowler / gist:885187
Created Mar 24, 2011
Reminders for HTML5 <video> + flash fall-through encoding from h.264 mov
View gist:885187
# reminder for h.264 + theora <video> preflighting. ignoring stupid webm for now.
# html5 code looks like (yes, the single/double quotes are correct)
# use medieelement.js for flash fall-through
# <video width="600" height="450">
# <source src="http://.../screencast.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
# <source src="http://.../screencast.ogv" type='video/ogg; codecs="theora, vorbis"'>
# </video>
# convert mov container to mpeg-4
View nutshell-post-api-example.html
<form action="" method="post">
Company name: <input name="account[name]" type="text"> <br>
Company email: <input name="account[email]" type="text"> <br>
Your name: <input name="contact[name]" type="text"> <br>
<textarea name="note" placeholder="Comments"></textarea>
<input name="ok" value="Submit" type="submit">
metar='curl -s -d "station_ids=karb,kozw,kyip,kdtw,ktol,kttf,klan,kjxn,kgrr" | egrep -o "[A-Z]{4} [0-9]{6}Z.+" | sed '\''s/<\/FONT><BR>//'\'
andyfowler / less-example.css
Created Nov 16, 2010
A sample of some CSS, written for less.js
View less-example.css
@import 'mixins.less';
nav {
ul {
list-style: none;
li {
float: left;
color: @tan;
andyfowler / mixins.css
Created Nov 16, 2010
Used in less.js
View mixins.css
/* ===================================== */
/* = Some less.js mixins from Nutshell = */
/* ===================================== */
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-moz-border-radius: @radius;
-webkit-border-radius: @radius;
.drop-shadow (@x:0, @y:1px, @feather:1px, @color:#fff) {
andyfowler / random-time-from-range.sql
Created Nov 2, 2010
Generate a random SQL time from a given range. For generating lots of fake data.
View random-time-from-range.sql
UNIX_TIMESTAMP('2010-12-30 15:00:00') -
UNIX_TIMESTAMP('2010-10-25 12:00:00')) +
UNIX_TIMESTAMP('2010-10-25 12:00:00')
andyfowler / lessjs.rb
Created Oct 23, 2010
Jekyll plugin to render less.js - fixed for new versions of jekyll
View lessjs.rb
module Jekyll
class LessCssFile < StaticFile
def write(dest)
# do nothing
# Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc
# Less.js will require node.js to be installed
View override_instance_name.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
You can’t perform that action at this time.