Skip to content

Instantly share code, notes, and snippets.

View said-and-done's full-sized avatar

Said Nuh said-and-done

  • @tv2 Editorial Dev Team
  • Copenhagen, Denmark
View GitHub Profile
#append to your .bashrc
# followed by [source ~/.bashrc] to re-evaluate bash file.
clear_cache(){
base="/var/www/"
cache="htdocs/app/tmp/cache/"
if [[ $PWD =~ $base([^/]+) ]]
then
find $base${BASH_REMATCH[1]}/$cache -type f ! -iname "*.log" -delete
fi
#!/bin/bash
# usage: extract ZIP to a new folder (eg video5)
# run: sh ./publish.sh video5 <ENTER>
MINARGS=1
ARGC=$#
if [ $ARGC -eq 0 ] ; then
FBGallery({
onShow: function(opt) {
//
},
onClose: function(opt) {
$('#popup-upload_overlay, #popup-upload').remove();
},
onSelected: function(data) {
console.log(data)
}
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
@said-and-done
said-and-done / gist:8349197
Created January 10, 2014 09:41
Create a dummy branch under github:export
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
#create a test branch under github:export
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
#create a test branch under github:export
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
# create a test branch under github:export
# https://github.com/nodesagency/cakephp-export
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
if (!window.console) {
window.console = {};
var methods = ['log', 'debug', 'info', 'error'], count = methods.length;
while (count--)
window.console[methods[count]] = function () {};
}