Skip to content

Instantly share code, notes, and snippets.

@cluke009
cluke009 / pre_save.py
Created August 22, 2012 14:13
Sublime Text 2 plugin that converts file to unix line endings and tabs to space on save
import sublime, sublime_plugin
# http://www.butlerpc.net/blog/2012/07/sublime-text-2-plugin-to-convert-tabs-to-spaces-on-save/
# tabs to spaces
# https://github.com/SublimeText/LineEndings/blob/master/LineEndings.py
# for line ending conversion code
class ConvertTabsToSpaces(sublime_plugin.EventListener):
def on_pre_save(self, view):
edit = view.begin_edit()
@cluke009
cluke009 / gist:4144873
Created November 25, 2012 19:25
SublimeLinter.sublime-settings
/*
SublimeLinter default settings
*/
{
/*
Sets the mode in which SublimeLinter runs:
true - Linting occurs in the background as you type (the default).
false - Linting only occurs when you initiate it.
"load-save" - Linting occurs only when a file is loaded and saved.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
<?php
$options['shell-aliases']['dev-mode'] = '!drush en -y devel && drush vset less_devel 1 && drush vset cache 0 && drush vset block_cache 0 && drush vset page_compression 0 && drush vset preprocess_css 0 && drush vset css_gzip_compression 0 && drush vset preprocess_js 0 && drush vset js_gzip_compression 0';
$options['shell-aliases']['prod-mode'] = '!drush dis -y devel && drush vset less_devel 0 && drush vset cache 1 && drush vset block_cache 1 && drush vset page_compression 1 && drush vset preprocess_css 1 && drush vset css_gzip_compression 1 && drush vset preprocess_js 1 && drush vset js_gzip_compression 1';
$options['structure-tables'] = array(
'common' => array(
'accesslog',
'cache',
#!/bin/bash
# https://nicaw.wordpress.com/2013/04/18/bash-backup-rotation-script/
# Julius Zaromskis
# Backup rotation
# Storage folder where to move backup files
# Must contain backup.monthly backup.weekly backup.daily folders
# Source folder where files are backed
source=$1/incoming
# The configuration of app when it is exposed to the web.
web:
locations:
"/":
root: "web"
passthru: true
rules:
'^(.*)$':
passthru: '/index.php?routestring=$1'
'^(admincp/)$':