Skip to content

Instantly share code, notes, and snippets.

@andycole
andycole / .gitconfig
Last active January 11, 2023 09:26
My git config
## Basic colours
[color]
branch = auto
diff = auto
status = auto
interactive = auto
ui = auto
[color "branch"]
current = yellow bold
source ~/.git-completion.sh
alias gco='git co'
alias gci='git ci'
alias grb='git rb'
//Block
.notification-popup {
width:100%;
height:100px;
}
//Element
.notification-popup_content {
color:black;
}
@andycole
andycole / pre-commit
Created February 11, 2014 17:33
Pre commit hook to check for common debugs (belongs in ./git/hooks)
#!/usr/local/bin/bash
# Add or remove keywords here
KEYWORDS_REGEX="var_dump\(|die\(|Zend_Debug::|print_r\(|console\.(debug|info|log|warn)\("
# Add extensions to check here
EXTENSIONS_REGEX="(.php$|.phtml$|.js$|.html$)"
ERRORS_BUFFER=""
TEXT_DEFAULT="\\033[0;39m"
TEXT_INFO="\\033[1;32m"
TEXT_ERROR="\\033[1;31m"
@andycole
andycole / gist:9b29cfbb6e7ae24e3728
Created May 2, 2014 08:32
Switch to desktop view of a responsive site - Edit viewport size
/*
* Class forceDesktopSite - Handles switching between desktop and responsive site for mobile user who want desktop experience.
*/
var forceDesktopSite = {
targetWidth: 1024,
viewport: $('meta[name="viewport"]'),
init: function() {
@andycole
andycole / gist:0a11266e94145101b970
Created May 7, 2014 09:50
Vagrant Issues for Ubuntu/Debian

Vagrant Issues for Ubuntu/Debian

PROBLEM 1

user ➤ vagrant up
VirtualBox is complaining that the kernel module is not loaded. Please
run `VBoxManage --version` or open the VirtualBox GUI to see the error
message which should contain instructions on how to fix this error.
@andycole
andycole / Preferences.sublime-settings
Created May 7, 2014 15:43
Preferences.sublime-settings
{
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
".tpl.php"
],
"font_size": 10,
@andycole
andycole / display.sh
Created May 7, 2014 16:10
~/.screenlayout/display.sh
#!/bin/sh
xrandr --output CRT1 --off --output DFP6 --mode 1280x1024 --pos 0x0 --rotate normal --output DFP7 --mode 1920x1080 --pos 1280x0 --rotate normal --output DFP4 --off --output DFP5 --off --output DFP2 --off --output DFP3 --off --output DFP1 --off
@andycole
andycole / amd-jquery-plugin-template.js
Last active August 29, 2015 14:13
AMD jQuery Plugin Template
// MYPLUGIN CLASS DEFINITION
// ==========================
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else {
factory(window.jQuery);
}
}(function ($) {