Skip to content

Instantly share code, notes, and snippets.

Avatar

Alistair Stead alistairstead

View GitHub Profile
View atom-material-theme.el
;;; 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
View gist:17e3db8a3f7450c636a7
### 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:
View keybase.md

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 Nov 1, 2014
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.
View local.xml
<?xml version="1.0"?>
<config>
<global>
<skip_process_modules_updates>1</skip_process_modules_updates>
</global>
</config>
@alistairstead
alistairstead / deploy.rb
Created Sep 25, 2012
magentify with silverstripe config
View deploy.rb
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
View gist:2351965
<!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;
}
View gist:2351041
<!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 Jun 29, 2011
Find bad things in Magento customisations
View gist:1053331
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"
View Build output
~/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 Feb 18, 2011
xDebug INI settings for use with MacGDBp and TextMate
View xdebug.ini
[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