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
// URL Rewriting in NGINX strips query parameters. This is a way to work around the problem. | |
// Written specifically for use in klein.php | |
function getURLQuery() | |
{ | |
$url = parse_url($_SERVER['REQUEST_URI']); | |
parse_str(urldecode($url['query']), $url['query']); | |
return $url['query']; | |
} |
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 | |
// UPC Capture Tool for Linea Pro / Simple Web Portal App | |
//Includes for Flourish and Connect Lib exist in Router | |
if(isset($_POST['formItemID']) || $_POST['formItemID'] != '') | |
{ | |
$connect = new ConnectDB; | |
$db = $connect->TempScan(); | |
$statement = $db->prepare("INSERT INTO captures (item_id, upc, ean) VALUES (%s, %s, %s)"); |
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 | |
// UPC Tool for Linea Pro Devices using Simple Web Portal App | |
// Connection Lib for Flourish exists at Router level! | |
if(isset($_POST['formItemID']) || $_POST['formItemID'] != '') | |
{ | |
$connect = new ConnectDB; | |
$db = $connect->TempScan(); | |
$statement = $db->prepare("INSERT INTO captures (item_id, upc, ean) VALUES (%s, %s, %s)"); |
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
SELECT TOP 1000 * FROM dbo.doSplit(store_data.feature_list,'<LI>Effective'); |
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
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre -y | |
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.11.tar.gz -O elasticsearch.tar.gz | |
tar -xf elasticsearch.tar.gz | |
rm elasticsearch.tar.gz | |
sudo mv elasticsearch-* elasticsearch | |
sudo mv elasticsearch /usr/local/share |
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
#!/bin/bash | |
echo "What do you want to call this Vagrant? " | |
read vmhostname | |
echo "What port number do you want for web access (:80)? " | |
read vmport | |
if [ ! -d $vmhostname ]; then | |
mkdir $vmhostname | |
cd $vmhostname |
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 | |
try { | |
$config = include __DIR__ . '/../app/config/config.php'; | |
$loader = new Phalcon\Loader(); | |
$loader->registerDirs(array( | |
$config->application->controllersDir, | |
$config->application->modelsDir |
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 factory($strt, $stop, $plus = 1) { | |
for ($n = $strt; $n <= $stop; $n += $plus) { | |
yield $n; | |
} | |
} | |
foreach(factory(1,10) as $output) { | |
echo $output . "\n"; | |
} |
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
var bone = require('bonescript'); | |
var state = bone.LOW; | |
bone.pinMode("USR0", bone.OUTPUT); | |
bone.pinMode("USR1", bone.OUTPUT); | |
bone.pinMode("USR2", bone.OUTPUT); | |
bone.pinMode("USR3", bone.OUTPUT); | |
setInterval(toggle, 10); | |
function toggle() { |
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
<HTML> | |
<HEAD> | |
<title>User Login</title> | |
<!-- Twitter Bootstrap stylesheet --> | |
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> | |
</HEAD> | |
<BODY> |