This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ----------------------------------------------------------- | |
# super basic script to migrate dev to master | |
# script continues if all processes go correctly | |
# all step-results echoed to screen | |
# | |
# usage: | |
# git dev2master | |
# | |
# ----------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Action to download special assets | |
* example link to download <?php echo $this->Html->link('Link Text', array('action' => 'download', Security::hash('filedownloadsalt'.date('d').env('REMOTE_ADDR')), $filename), array('escape' => false)); ?> | |
* example URL to download <?php echo $this->Html->url(array('action' => 'download', Security::hash('filedownloadsalt'.date('d').env('REMOTE_ADDR')), $filename)); ?> | |
* @param string $hash | |
* @param string $filename | |
*/ | |
function download($hash=null, $filename=null) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Assumes you will have this file in the repo root level folder | |
SCRIPT="$(readlink -nf ${0#./})" | |
SCRIPTNAME="${0##*/}" | |
ROOTBASE="${SCRIPT%/*}" | |
cd $ROOTBASE | |
git submodule init && git submodule update | |
$ROOTBASE/app/cake bisect script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This tester is a great tool for testing something in an easy way to make git bisect work for you | |
* note: not part of the repo, so it's not overwritten by git | |
* @link http://book.git-scm.com/5_finding_issues_-_git_bisect.html | |
* @link http://alblue.bandlem.com/2011/07/git-tip-of-week-git-bisect.html | |
*/ | |
class BisectShell extends Shell{ | |
var $uses = array('Event', 'Util', 'Asset'); | |
# test: return true/false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~rtomayko/.screenrc | |
# ------------------------------------------------------------------- | |
# Settings | |
# ------------------------------------------------------------------- | |
crlf off # No Microsoft linebreaks | |
startup_message off # bypass GPL notice (we're aware) | |
defscrollback 15000 # big scrollback | |
#shell bash # don't start login shells | |
shelltitle "" # no title by default - set in PS1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Handle file uploads via XMLHttpRequest | |
*/ | |
class UploadedFileXhr { | |
/** | |
* Save the file to the specified path | |
* @return boolean TRUE on success | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$recycle_date = null; | |
// if 305 (Expired Card) -- we alter the cc_expires on retries every 4 days | |
if ($response_code == 305 && $attempts < 5) { | |
$cc_expires_year_increment = 0; | |
if ($attempts==1) { | |
// increment expires year by 3 = ~30% fix | |
$cc_expires_year_increment = 3; | |
} elseif ($attempts==2) { | |
// increment expires year by 2 = ~20% fix | |
$cc_expires_year_increment = 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
// plugins | |
{ "keys": ["ctrl+shift+t"], "command": "whitespacecorrector" }, | |
{ "keys": ["ctrl+x"], "command": "clipboard_manager_cut" }, | |
{ "keys": ["ctrl+c"], "command": "clipboard_manager_copy" }, | |
{ "keys": ["ctrl+v"], "command": "clipboard_manager_paste", "args": { "indent": true } }, | |
{ "keys": ["ctrl+alt+v"], "command": "clipboard_manager_paste", "args": { "indent": false } }, | |
{ "keys": ["ctrl+shift+v"], "command": "clipboard_manager_choose_and_paste" }, | |
{ "keys": ["ctrl+i", "ctrl+alt+v"], "command": "clipboard_manager_next_and_paste" }, | |
{ "keys": ["ctrl+i", "ctrl+shift+v"], "command": "clipboard_manager_previous_and_paste" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; configuration for php Xcache module | |
[xcache-common] | |
;; install as zend extension (recommended), normally "$extension_dir/xcache.so" | |
zend_extension = /usr/lib/php5/20090626/xcache.so | |
[xcache.admin] | |
xcache.admin.auth = On | |
xcache.admin.user = "appadmin" | |
;xcache.admin.pass = md5(yourpassword) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my ($previous_head, $current_head, $is_branch_checkout) = @ARGV; | |
my ($is_on_facelift, $run_compass) = 0; | |
if ($is_branch_checkout) { | |
$is_on_facelift = `git branch | grep -e "^\*.*facelift"`; | |
chomp $is_on_facelift; |