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
| # Step 0 -- create test data | |
| redis-cli HSET :object:30343552:data foo bar | |
| # Step 1 -- store sample function 'sampleFunction' | |
| redis-cli SET :functions:sample "redis.call('SELECT', 0);local data=redis.call('HGETALL',':object:' .. ARGV[1] .. ':data');return data" | |
| # Step 2 -- create function loader | |
| redis-cli SCRIPT LOAD "f=loadstring(redis.call('get',':functions:' .. KEYS[1]));return f()" | |
| # Step 3 -- test |
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 | |
| // constants | |
| define('WITHSCORES', true); | |
| define('REDIS_CONNECTION', ((CLI) ? '/var/run/redis.socket' : '127.0.0.1')); // localhost or socket | |
| #define('REDIS_CONNECTION', '127.0.0.1'); // localhost only | |
| define('REDIS_NAMESPACE', 'lou:'); // use custom prefix on all keys | |
| define('REDIS_DB', 1); | |
| #define('REDIS_AUTH', ''); | |
| define('REDIS_LOG_FILE', ((CLI) ? $_SERVER['PWD'] : $_SERVER['DOCUMENT_ROOT']).'/logs/redis.txt'); |
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 | |
| /** | |
| * SplClassLoader implementation that implements the technical interoperability | |
| * standards for PHP 5.3 namespaces and class names. | |
| * | |
| * http://groups.google.com/group/php-standards/web/final-proposal | |
| * | |
| * // Example which loads classes for the Doctrine Common package in the | |
| * // Doctrine\Common namespace. |
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 | |
| /** | |
| * php_XCache | |
| * | |
| * @package XCache | |
| * @version $Id$ | |
| * @copyright 2014 | |
| * @author Roland Braband <[email protected]> | |
| * @license BSD {@link http://www.opensource.org/licenses/bsd-license.php} |
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
| /* | |
| * L.CircleEditor is an extension of L.Circle, just to add the edition part (remember, radius in meters). | |
| */ | |
| L.CircleEditor = L.Circle.extend ({ | |
| options: { | |
| icon: new L.DivIcon({ | |
| iconSize: new L.Point(8, 8), | |
| className: 'leaflet-div-icon leaflet-editing-icon' |
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
| @ECHO OFF && PUSHD "%~dp0" && SETLOCAL | |
| ECHO [%date% - %time%] Log start > download.log | |
| SC Stop Graphhopper > nul | |
| RENAME europe-latest.osm.pbf old_europe-latest.osm.pbf | |
| REM Wget: retrieve files from the WWW http://gnuwin32.sourceforge.net/packages/wget.htm | |
| WGET --no-verbose --append-output=download.log --tries=3 http://download.geofabrik.de/europe-latest.osm.pbf | |
| IF exist %~dp0\europe-latest.osm.pbf ( | |
| ECHO [%date% - %time%] Download successful >> download.log | |
| DEL old_europe-latest.osm.pbf | |
| PUSHD %~dp0\europe-latest.osm-gh |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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 | |
| rundir=$(dirname "$(readlink -e "$0")") | |
| pidfile=$rundir/test.pid | |
| (nohup php -q -f test.php > /dev/null) & echo $! > $pidfile & |
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
| <!doctype HTML> | |
| <html> | |
| <head> | |
| <title>discord browser example</title> | |
| </head> | |
| <body> | |
| <script> | |
| 'use strict'; | |
| class EventEmitter { |
OlderNewer