Skip to content

Instantly share code, notes, and snippets.

@lgrz
lgrz / db_add
Created February 5, 2010 04:00
bash scripts - apache, mysql
#!/usr/bin/env bash
#
# db_add
# A script to configure a new database
#
if [[ $# -lt 2 ]]
then
echo "usage: db_add <db-name> <db-server> [db-host]"
echo "example 1 connect from localhost: db_add \"db-name\" \"db-server\" \"localhost\""
<p\b[^>]*>(.*?)<\/p>
<br.[^>]*>
@lgrz
lgrz / SOAPpy-patch.diff
Created August 19, 2010 00:06
Patch for SOAPpy package
diff --git a/SOAPpy/Client.py b/SOAPpy/Client.py
index 15542b0..0d38237 100644
--- a/SOAPpy/Client.py
+++ b/SOAPpy/Client.py
@@ -40,11 +40,11 @@
################################################################################
"""
+from __future__ import nested_scopes
+
#!/bin/bash
# Shortcut for converting videos to avi format
if [[ $# -ne 1 ]]
then
echo "Usage: $0 <file>"
exit 1
fi
OUTFILE=${1/.*/}
/*
* ShortCut
* Mini routing for jQuery
*/
(function($){
$.shortCut = function(settings){
var defaults = {
controller: false,
init: false,
element: $('body'),
#!/bin/sh
# http://stackoverflow.com/questions/392332/retroactively-correct-authors-with-git-svn
# Fix authors after svn export
git filter-branch --env-filter '
n=$GIT_AUTHOR_NAME
m=$GIT_AUTHOR_EMAIL
case ${GIT_AUTHOR_NAME} in
miked) n="Mike D" ; m="[email protected]" ;;
#!/usr/bin/env bash
#
# epub build script
# run from within the root folder of your epub
this=$(basename $0)
# Help
if [ "$1" == "-h" ]; then
shift;
# Settings
#
fontName = "Monaco"
fontSize = 12
# File type specific configuration
#
[ source.js ]
softTabs = true
tabSize = 2
@lgrz
lgrz / gist:2374082
Created April 13, 2012 05:34
pre-commit
# Check coding standards
exec git diff --cached --name-status | awk '$1 == "A" || $1 == "M" { print $2 }' | xargs /usr/bin/env phpcs --standard=WordPress
@lgrz
lgrz / gist:2760430
Created May 21, 2012 03:21
php53 & php54 formula patch
diff --git a/Formula/php53.rb b/Formula/php53.rb
index 7adbbea..a456a1a 100644
--- a/Formula/php53.rb
+++ b/Formula/php53.rb
@@ -76,12 +76,16 @@ class Php53 < Formula
return p
end
+ def config_path
+ etc+"php/5.4"