Skip to content

Instantly share code, notes, and snippets.

Andy Fowler andyfowler

View GitHub Profile
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) {
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>//'\'
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">
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
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 / gist:1355424
Created Nov 10, 2011
Unicode :(
View gist:1355424
# curl -i -F "url=" -F "code=%E2%9C%88"
HTTP/1.1 100 Continue
HTTP/1.1 201 Created
Server: nginx/1.0.4
X-Node: gitio1
X-Sha: d0b3b3eeb4b0c1b06ba46abc008d3db839b319f6
Content-Type: text/html;charset=utf-8
Date: Thu, 10 Nov 2011 16:54:36 GMT
andyfowler / gist:3291314
Created Aug 8, 2012
3-second tapped song vs password
View gist:3291314

Back-of-napkin thoughts prompted by

3-second song clip, in taps

Say the typical song is 120 BPM.

( 120BPM / 60s = 2 beats per second) * 3 seconds = 6 beats (quarter-notes)

Biggest assumption is that 6 beats in 3 seconds @ sixteenth note resolution = 24 available notes of resolution

andyfowler / gist:5030607
Created Feb 25, 2013
vagrant box export hackage
View gist:5030607
# update vbox additions
sudo sudo mount /dev/sr0 /mnt
sudo /mnt/
sudo rm -rf /usr/src/vboxguest*
sudo aptitude purge build-essential
View gist:5118546
class a {
protected $foo;
public function showFoo() {
echo $this->foo;
andyfowler / gist:10281760
Created Apr 9, 2014
Check if your RapidSSL cert is revoked in their OCSP server
View gist:10281760
# download the rapidssl intermediate bundle
curl > rapidssl-bundle.pem
# check if your (presumably revoked) cert is revoked via its OCSP server
# this OCSP url is also in your cert, in the Authority Information Access section
openssl ocsp -issuer rapidssl-bundle.pem -cert YOURCERT.crt -url
You can’t perform that action at this time.