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
/** | |
* scriptloader.js | |
* | |
* Script loader, specially for CDN fallback behavior. | |
* Adapted from Steve Souders code (thanks Steve) by | |
* Anderson G. Martins from Joomla Bamboo. | |
* | |
* Added the option to set a fallback URL, which will be used | |
* trying to load a local copy of the requested file. | |
* |
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
# Fix locale.getdefaultlocale() on OS X 10.8 - Mountain Lion | |
os.environ['LANG'] = 'en_US.UTF-8' |
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
/** | |
* Fullscreen background image responsive | |
* @author Anderson G. Martins <[email protected]> | |
*/ | |
(function ($) { | |
// Use image reload to fix empty dimensions | |
$.fn.imageSize = function(fn) | |
{ | |
this.each(function() { | |
var img = new Image(); |
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/env python | |
from pypodio2 import api | |
import sys, shutil, os, json | |
c = api.OAuthClient(sys.argv[1],sys.argv[2], sys.argv[3], sys.argv[4]) | |
orginfo = c.transport.get(url = '/org/') | |
def writerawtext(filename, data): | |
try: |
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
function getCategoryTree($categories){ | |
$mainframe = &JFactory::getApplication(); | |
$db = &JFactory::getDBO(); | |
$user = &JFactory::getUser(); | |
$aid = (int) $user->get('aid'); | |
if(!is_array($categories)){ | |
$categories = (array)$categories; | |
} | |
JArrayHelper::toInteger($categories); | |
$categories = array_unique($categories); |
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
Ti.App.Properties.setList('DB_queue', []); | |
Ti.App.Properties.setBool('DB_locked', false); | |
Ti.App.Properties.setBool('DB_queue_running', false); | |
Ti.include('db.js', 'examples.js'); |
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
# https://www.digitalocean.com/community/articles/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04 | |
sudo apt-get update | |
sudo apt-get install mysql-server | |
sudo apt-get install nginx | |
sudo service nginx start |
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 | |
/* | |
* From: http://abhinavsingh.com/blog/2009/12/how-to-use-locks-in-php-cron-jobs-to-avoid-cron-overlaps/ | |
*/ | |
define('LOCK_DIR', '/tmp/'); | |
define('LOCK_SUFFIX', '.lock'); | |
class CronHelper { |
OlderNewer