Skip to content

Instantly share code, notes, and snippets.

View matt-bailey's full-sized avatar

Matt Bailey matt-bailey

  • GPMD
  • London, UK
View GitHub Profile
@matt-bailey
matt-bailey / frontend-tools.sh
Last active September 28, 2015 22:01
Example frontend tools setup shell script (I use it with Vagrant and a Linux box). Includes Java, Node, PhantomJS, sitespeed.io, Gunt, Bower and Compass
#!/bin/bash
# Vars
java="java"
xsltproc="xsltproc"
node="node"
phantomjs="phantomjs"
grunt="grunt"
bower="bower"
compass="compass"
@matt-bailey
matt-bailey / cross-browser-inline-block.css
Created April 10, 2012 09:36
CSS: Cross Browser Inline-Block
/* Source: http://css-tricks.com/snippets/css/cross-browser-inline-block/ */
li {
display: -moz-inline-stack;
display: inline-block;
vertical-align: top;
zoom: 1;
*display: inline;
}
@matt-bailey
matt-bailey / gist:2498745
Created April 26, 2012 10:50
Image sprite fading
/* http://css-tricks.com/fade-image-within-sprite/ */
/* HTML - <a href="#" class="arrow">Arrow<span></span></a> */
/* CSS */
.arrow {
display: inline-block;
position: relative;
text-indent: -9999px;
@matt-bailey
matt-bailey / gist:2519776
Created April 28, 2012 15:18
Responsive Image Test
<!doctype html>
<html>
<head>
<title>Responsive image test</title>
<meta charset="utf-8"/>
</head>
<body>
<div id="browser"></div>
@matt-bailey
matt-bailey / index.html
Created June 27, 2012 16:03
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Papercut &middot; CodePen</title>
<style>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Papercut &middot; CodePen</title>
<style>
/* General Set Up Styles */
@matt-bailey
matt-bailey / gist:3524441
Created August 30, 2012 08:53
Terminal - MySQL dumping and importing
# Import sql dump into database
cat dump.sql | mysql -u[username] -p[password] [database-name]
# MySQL dump
mysqldump -u[username] -p[password] [database-name] > /var/backups/dump.txt
@matt-bailey
matt-bailey / gist:3609371
Created September 3, 2012 13:34
Terminal - Chmod folders/files recursively
# -R recursively all + read & write
chmod -R a+rw [folder]/
@matt-bailey
matt-bailey / gist:3664262
Created September 7, 2012 08:05
Terminal - Rename a file
# Basically moves a file
mv [old-file-name] [new-file-name]
@matt-bailey
matt-bailey / gist:3667136
Created September 7, 2012 15:23
Terminal - List files
# options - long list, show all
ls -la
# options - long list, reverse order, sort by modification time
ls -lrt
# Print working directory
pwd