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
> cd htdocs/app/Plugin/Export
> git co -b a-test-branch
> git push -u origin a-test-branch
FBGallery({
onShow: function(opt) {
//
},
onClose: function(opt) {
$('#popup-upload_overlay, #popup-upload').remove();
},
onSelected: function(data) {
console.log(data)
}
#!/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
#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