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 | |
/** | |
* | |
* @package OpenFlame Web Framework | |
* @copyright (c) 2010 OpenFlameCMS.com | |
* @license http://opensource.org/licenses/mit-license.php The MIT License | |
* @link http://github.com/OpenFlame/OpenFlame-Framework | |
* | |
* Minimum Requirement: PHP 5.0.0 | |
*/ |
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 | |
define('SFSLIB', dirname(__FILE__) . '/src/'); | |
define('OF_ROOT', dirname(__FILE__) . '/vendor/OpenFlame/src/'); | |
require OF_ROOT . 'Of.php'; | |
require OF_ROOT . 'OfException.php'; | |
// Register the OpenFlame Framework autoloader | |
spl_autoload_register('Of::loader'); |
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
{% block js %} | |
{% if use_jquery %} | |
<script type="text/javascript" src="{{ global_style_path|e }}js/jquery.js"></script> | |
{% if javascript_globals %} | |
<script type="text/javascript"> | |
$.freeq = { {% for name,value in javascript_globals %} | |
{{ name }} : "{{ value }}"{% if not loop.last %},{% endif %}{% endfor %} | |
}; | |
</script> | |
{% endif %} |
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 | |
wget -q --timeout=300 -O /var/www/codebite.net/files/minecraft_iso_big.png http://***/maps/TC***_iso_full.png | |
wget -q --timeout=300 -O /var/www/codebite.net/files/minecraft_iso_small.png http://***/maps/TC***_iso_sml.png | |
chown ftpuser:ftpgroup /var/www/codebite.net/files/minecraft_iso_big.png | |
chown ftpuser:ftpgroup /var/www/codebite.net/files/minecraft_iso_small.png |
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 | |
cd /home/minecraft/mcmap/ | |
WORLD=/home/minecraft/world/ | |
OUTPUT="/var/www/minecraft/maps" | |
################################ | |
FILE=history-`date +%s`.png | |
OLD5=none |
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
@@ -58,11 +58,12 @@ class Twig_Loader_Filesystem implements Twig_LoaderInterface | |
foreach ($paths as $path) { | |
if (!is_dir($path)) { | |
throw new Twig_Error_Loader(sprintf('The "%s" directory does not exist.', $path)); | |
} | |
- $this->paths[] = realpath($path); | |
+ $realpath = realpath($path); | |
+ $this->paths[] = ($realpath !== false) ? $realpath : $path; | |
} |
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
desdenova@deep-thought:~$ ping localhost | |
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data. | |
--- localhost.localdomain ping statistics --- | |
6 packets transmitted, 0 received, 100% packet loss, time 4999ms | |
desdenova@deep-thought:~$ ping google.com | |
PING google.com (74.125.227.51) 56(84) bytes of data. | |
64 bytes from 74.125.227.51: icmp_seq=1 ttl=56 time=1.13 ms | |
64 bytes from 74.125.227.51: icmp_seq=2 ttl=56 time=1.88 ms |
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 | |
$avvy_1 = './shana_avvy_small.png'; | |
$avvy_2 = './highlander_avvy_med.png'; | |
######################################### | |
$day = gmdate('j'); | |
$start = strtotime('Today 0:00 -0000'); | |
$expires = strtotime('Today 23:59 -0000'); | |
$avvy = (($day % 2) === 1) ? $avvy_1 : $avvy_2; | |
if(isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $start) |
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 | |
$first_unique_seed = 'abcdef'; | |
$second_unique_seed = '123456'; | |
$hash = hash('md5', implode('', array($first_unique_seed, $second_unique_seed, (string) microtime(true)))); | |
$str = ''; | |
foreach(str_split($hash, 2) as $char) | |
{ | |
$str .= hexdec($char); | |
} |