Skip to content

Instantly share code, notes, and snippets.

View mirzu's full-sized avatar

Michal Minecki mirzu

View GitHub Profile
@mirzu
mirzu / gist:3077162
Created July 9, 2012 15:25
sample drupal "json"
{
"apiVersion":"1.0",
"entityType":"node",
"entityID":"4",
"url":"http:\/\/project.loco:8080\/?q=node\/4",
"authorId":"1",
"authorName":"admin",
"authorUrl":"http:\/\/project.loco:8080\/?q=user\/1",
"created":"1340365718",
"changed":"1340365718",
@mirzu
mirzu / gist:2844183
Created May 31, 2012 15:31
alias file
<?php
// put the below in a file in ~/.drush/slc.alaises.drushrc.php
// allows commands like
// drush sql-sync @stage @mirzu
// -- to move the staging db to your sandbox
// and commands like
// drush rsync @stage @mirzu
// -- to move the files directory from staging to your sandbox
// with a couple of modifications it works with you local box as well.
test
<?php
// how the session variable is used in the system module.
if (isset($_SESSION['ignore_slave_server'])) {
if ($_SESSION['ignore_slave_server'] >= REQUEST_TIME) {
Database::ignoreTarget('default', 'slave');
}
else {
unset($_SESSION['ignore_slave_server']);
}
@mirzu
mirzu / .gitconfig
Created October 21, 2011 22:05
Mike's .gitconfig
[color]
diff = auto
status = auto
branch = auto
[push]
default = tracking
[core]
editor = mvim -f
[alias]
co = checkout