git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd YOUR-FORKED-REPO
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
<?php | |
$pdo = new PDO("mysql:host=HOSTNAME", "USERNAME", "PASSWORD"); | |
$query = $pdo->prepare("SHOW DATABASES"); | |
$query->execute(); | |
foreach ($query->fetchAll(PDO::FETCH_OBJ) as $row) { | |
$db = $row->Database; | |
echo "= $db =" . PHP_EOL; | |
$pdo->exec("USE $db"); |
<?php | |
/* | |
Plugin Name: R Debug | |
Description: Set of helper dump functions for debug. | |
Author: Andrey "Rarst" Savchenko | |
Author URI: http://www.rarst.net/ | |
License: GPLv2 or later | |
License URI: http://www.gnu.org/licenses/gpl-2.0.html | |
*/ |
// http://kubyshkin.ru/posts/installing-php-xdebug-extension-on-mac-os-x-10-7-lion.html | |
MACOSX_DEPLOYMENT_TARGET=10.7 | |
CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" | |
CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" | |
CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe" | |
LDFLAGS="-arch i386 -arch x86_64 -bind_at_load" | |
export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET | |
./configure \ | |
--prefix=/usr \ |
#!/bin/bash | |
# | |
# ************************************************* | |
# chkconfig: 2345 99 99 | |
# description: notify email address on system boot. | |
# ************************************************* | |
# Installing: | |
# 1) save as /etc/rc.d/init.d/notify | |
# 2) set the desired email address in "MAILADD" variable | |
# 3) chmod a+w /etc/rc.d/init.d/notify |
Options: | |
soundcloud.py --genre | |
soundcloud.py search | |
soundcloud.py user | |
soundcloud.py tracks | |
soundcloud.py url | |
soundcloud.py playlist | |
Usage: |
// Example: | |
Loader.load("/script/main.js"); | |
Loader.load(base_url + '/include/fancybox2/jquery.fancybox.pack.js', function() { | |
$('.fancybox').fancybox(); | |
}); | |
var Loader = { | |
load: function(src, callback) { | |
var script = document.createElement('script'), |
#!/bin/bash | |
target_branch="production" | |
working_tree="PATH_TO_DEPLOY" | |
while read oldrev newrev refname | |
do | |
branch=$(git rev-parse --symbolic --abbrev-ref $refname) | |
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then | |
# Basic commands | |
:Git [args] # does what you'd expect | |
all of your `~/.gitconfig` aliases are available. | |
:Git! [args] # same as before, dumping output to a tmp file | |
Moving inside a repo. |
# ~~start~~ Do not remove this comment, prestashop will keep automatically the code outside this comment when .htaccess will be generated again | |
# .htaccess automaticaly generated by prestashop e-commerce open-source solution | |
# http://www.prestashop.com - http://www.prestashop.com/forums | |
<IfModule mod_rewrite.c> | |
<IfModule mod_env.c> | |
SetEnv HTTP_MOD_REWRITE On | |
</IfModule> | |
RewriteEngine on |