This file contains hidden or 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
function JTranslate { | |
COMPONENT=$1; | |
COMPONENTUPPER=`echo $COMPONENT | sed y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/`; | |
touch ../../language/en-GB/en-GB.$COMPONENT.ini; | |
{ find . -exec grep -o `echo $COMPONENTUPPER"[A-Z0-9_]*"` {} \; | sort -u && find ../../language/en-GB/en-GB.$COMPONENT.ini -exec grep -o `echo $COMPONENTUPPER"[A-Z0-9_]*"` {} \; | sort -u;} | sort | uniq -u | sed s/$/=\"\"/ >> ../../language/en-GB/en-GB.$COMPONENT.ini; | |
vim ../../language/en-GB/en-GB.$COMPONENT.ini; | |
} |
This file contains hidden or 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 | |
/** | |
* Add a single condition, or an array of conditions to the WHERE clause of the query. | |
* | |
* Usage: | |
* $query->where('a = 1')->where('b = 2'); | |
* $query->where(array('a = 1', 'b = 2')); | |
* | |
* @param mixed $conditions A string or array of where conditions. | |
* @param string $glue The glue by which to join the conditions. Defaults to AND. |
This file contains hidden or 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/sh | |
# Joomla extension auto installation | |
# Use that for development purpose, don't ever think of using it on a production website. | |
# The developer of that script won't endorse any problem you may encounter by using this script: Use it at your own risk! | |
# Please configure the three first params before using it. | |
# Usage : | |
# ./install.sh | |
# Will try to install every dir in the current dir | |
# ./install.sh directory |
This file contains hidden or 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
YUI({ | |
combine: false, | |
base: "/yui3/build/" | |
}).use("app","handlebars","jsonp",function(Y){ | |
/** | |
* Article Model | |
**/ | |
var Article = Y.Base.create("article",Y.Model,[],{ | |
idAttribute: 'articleId' | |
},{ |
This file contains hidden or 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 | |
mkdir output | |
for file in *.mkv; do | |
ffmpeg -i "$file" -vcodec copy -acodec libmp3lame -sameq "output/$file" | |
done |
This file contains hidden or 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 | |
function JPackage { | |
echo -e "\\033[1;34m" Removing all zip files from folder; | |
rm *.zip; | |
echo -e "\\033[1;34m" Done; | |
for file in *; do | |
if [ -d $file ]; then |
This file contains hidden or 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
YUI.add("mymodellist",function(Y){ | |
Y.namespace('mymvc').MyModellist = Y.Base.create( | |
"mymodellist", | |
Y.ModelList, | |
[], | |
{ | |
model: Y.mymvc.MyModel, | |
fetch: function(start,count,callback){ | |
Y.io("somejson.json",{ | |
data: { |
NewerOlder