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 / yo webapp output
Last active December 16, 2015 16:59
yo webapp output
Out of the box I include HTML5 Boilerplate, jQuery and Modernizr.
Would you like to include Twitter Bootstrap for Sass? (Y/n)
Would you like to include RequireJS (for AMD support)? (Y/n)
create Gruntfile.js
create package.json
create .gitignore
create .gitattributes
create .bowerrc
create component.json
create .jshintrc
# To compress
tar -zcvf archive_name.tar.gz folder_to_compress
# To extract
tar -zxvf archive_name.tar.gz
@matt-bailey
matt-bailey / gist:3911666
Created October 18, 2012 13:05
Sass vs Less - Placeholders
// Source: http://ianstormtaylor.com/oocss-plus-sass-is-the-best-way-to-css/
// Sass
%separator
border-top: 1px solid black
hr
@extend %separator
.separator
@extend %separator
@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
@matt-bailey
matt-bailey / gist:3667087
Created September 7, 2012 15:18
Terminal - Secure Copy file
# Copy file from local to remote server (reverse to copy the other way)
scp [filename] [user]@[remote-server]:/tmp/
@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: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:3609369
Created September 3, 2012 13:33
Terminal - Rsync merge files/folders from one server to another
# Merge from remote to local (exclude .svn folders)
rsync -av --exclude '.svn' [username]@[server]:/[path-to-folder]/[folder] ./
--progress
# Use this flag to show progress
# ./ means merge into the current folder (it needs to exist!)
# Reverse paths to go from local to remote
@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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Papercut &middot; CodePen</title>
<style>
/* General Set Up Styles */