Skip to content

Instantly share code, notes, and snippets.

View alistairstead's full-sized avatar

Alistair Stead alistairstead

View GitHub Profile
;;; atom-material-theme.el --- A emacs theme base on
;; Copyright (C) 2017 Alistair Stead
;;; Commentary:
;; Theme based on atom editor
;;;; Optional packages that enhance the theme
;; * https://github.com/tom-tan/hlinum-mode
### Keybase proof
I hereby claim:
* I am alistairstead on github.
* I am alistairstead (https://keybase.io/alistairstead) on keybase.
* I have a public key whose fingerprint is ADFF 4BAB 46FE 8B11 2763 C2BB A68A 4ACA E7DF 64A4
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am alistairstead on github.
  • I am alistairstead (https://keybase.io/alistairstead) on keybase.
  • I have a public key whose fingerprint is B8F7 6947 E7DF 8FD1 8836 79B6 DEC3 75AC BD51 AA93

To claim this, I am signing this object:

@alistairstead
alistairstead / local.xml
Created November 1, 2014 12:09
Disable the automatic application of update scripts on each page request following cache clear. Use MageRun to apply the upgrades manually within a controlled step.
<?xml version="1.0"?>
<config>
<global>
<skip_process_modules_updates>1</skip_process_modules_updates>
</global>
</config>
@alistairstead
alistairstead / deploy.rb
Created September 25, 2012 14:21
magentify with silverstripe config
set :application, "set your application name here"
set :domain, "#{application}.com"
set :deploy_to, "/Users/ali/magento"
set :use_sudo, false
set :scm, :none
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "localhost" # Your HTTP server, Apache/etc
@alistairstead
alistairstead / gist:2351965
Created April 10, 2012 14:55
Spinner.html
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Widget</title>
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<link rel="stylesheet" href="http://yuilibrary.com/yui/docs/assets/node/node.css">
<style type="text/css" scoped>
.yui3-js-enabled .yui3-spinner-loading {
display:none;
}
<!DOCTYPE html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Node-1</title>
<script src="http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js"></script>
<link rel="stylesheet" href="http://yuilibrary.com/yui/docs/assets/node/node.css">
</head>
<body>
<form id="demo" action="#">
@alistairstead
alistairstead / gist:1053331
Created June 29, 2011 07:36
Find bad things in Magento customisations
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getModel("
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getResourceModel("
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "Mage::getSingleton("
find . -name "*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']"
find . -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape("
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "htmlEscape("
find ./app/code/local -name "*/Block/*.phtml" -print | xargs grep --color=auto -iRnH "SELECT.*FROM.*;[\"\']"
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "\$_[GET|REQUEST|SERVER|POST]"
find ./app/code/local -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct"
find . -name "*.php" -print | xargs grep --color=auto -iRnH "public _construct"
@alistairstead
alistairstead / Build output
Created May 13, 2011 10:29
Build with veewee
~/vagrant
→ vagrant basebox build ubuntu-10.10-amd64
Verifying the isofile ubuntu-10.10-server-amd64-netboot.iso is ok.
We found no good state so we are destroying the previous machine+disks
VBoxManage unregistervm 'ubuntu-10.10-amd64' --delete
Deleting vm ubuntu-10.10-amd64
Creating vm ubuntu-10.10-amd64 : 256M - 1 CPU - Ubuntu_64
Creating new harddrive of size 10140
VBoxManage createhd --filename '/Users/ali/VirtualBox VMs/ubuntu-10.10-amd64/ubuntu-10.10-amd64.vdi' --size '10140' --format vdi > /dev/null
@alistairstead
alistairstead / xdebug.ini
Created February 18, 2011 10:50
xDebug INI settings for use with MacGDBp and TextMate
[xdebug]
zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so
xdebug.cli_color = 1
; xdebug.scream = 1
[xdebug-remote-debug]
; xdebug.remote_enable = On
; xdebug.remote_autostart = 1
; xdebug.remote_mode = jit
; xdebug.remote_connect_back = 1