Skip to content

Instantly share code, notes, and snippets.

@5eleven
5eleven / gist:2484313
Created April 24, 2012 22:25 — forked from Kerrick/gist:2476702
Ready a live site for deployment via Git instead of FTP, and keep the git directory separate from the working tree on the server.
# On the server
# Assuming you the site is served from ~/www/example.com/ and you want the git directory to live in ~/git/
# Keep in mind that ^C is Control-C, or what ever the command is for your server to halt a program.
mkdir ~/git/example.com.git && cd ~/git/example.com.git
git init --bare
git config core.bare false
git config core.worktree ~/www/example.com
git config receive.denycurrentbranch ignore
cat > hooks/post-receive
#!/bin/sh
@5eleven
5eleven / Preferences.sublime-settings
Last active October 6, 2015 07:58
5eleven Sublime Text 2 User Prefs
{
"bold_folder_labels": true,
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",
"draw_white_space": "all",
"fade_fold_buttons": false,
"font_size": 14.0,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
@5eleven
5eleven / Main.Sublime-menu file
Created July 4, 2012 09:07
Sublime Text 2 Layout: Grid: 6
// "Cols" and "Rows" specify the coordinates in x and y.
// Cells create cells by indexing the rows and cols array in the order [startx, starty, endx, endy].
// Edit your Main.Sublime-menu file
// Mac: /Users/yourMacName/Library/Application Support/Sublime Text 2/Packages/Default
// PC: C:\Users\yourPCName\AppData\Roaming\Sublime Text 2\Packages\Default
// Example Below:
{
"caption": "Grid: 6",
"command": "set_layout",
@5eleven
5eleven / GitDeploy
Created July 18, 2012 08:03
Git Deployment
//First, create a directory on your server and initialize an empty git repository. I like to serve my websites from ~/www/, so that's what I'll do in this example.
mkdir ~/www/example.com && cd ~/www/example.com
git init
//Next, let's set up your server's git repo to nicely handle deployment via git push.
git config core.worktree ~/www/example.com
git config receive.denycurrentbranch ignore
@5eleven
5eleven / Capistrano.Mysql
Created July 26, 2012 01:19
Capistrano task to pull MySQL production data to develoment database
# Fetches the production database on the server contents into the development
# database
#
# Assumes you have dbuser, dbhost, dbpassword, and application defined somewhere in your
# task. Modify as needed - database.yml is used for importing data, just not for exporting.
#
# Only supports MySQL.
desc "Load production data into development database"
task :fetch_remote_db, :roles => :db, :only => { :primary => true } do
require 'yaml'

Breaking into Web Development

I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).

To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential). To learn these technologies you should use several in combination on on

@5eleven
5eleven / sprite-mixins.scss
Created August 9, 2012 19:26
Sprite Mixin Example
//Rough Mixin Example
//Background position coordinates is shorthand X, Y.
@mixin sprites($coor1, $coor2, $coor3, $coor4, $coor5, $coor6, $height, $width) {
background: url(images/sprite.jpg) $coor1 $coor2;
display: block;
height: $height;
width: $width;
&:hover {
background-position: $coor3 $coor4;
}
@5eleven
5eleven / _buttons.scss
Created September 6, 2012 01:55
SCSS Button Mixins
//Based on http://css3-buttons.heroku.com which only had SASS version of the mixin.
@mixin rounded($border) {
-webkit-border-radius: $border;
-moz-border-radius: $border;
border-radius: $border;
}
@mixin shadow {
@5eleven
5eleven / .gitignore
Created September 28, 2012 04:57
.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@5eleven
5eleven / .gitignore
Created September 28, 2012 05:01 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your