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 | |
/* Generate MySQL - CREATE TABLE and LOAD DATA LOCAL INFILE statements from a DataSift CSV file */ | |
// Edit with file location and name. | |
$myFile = "test.csv"; | |
$lines = file($myFile); | |
$fields = preg_split('/,/', $lines[0]); | |
$create = "CREATE TABLE IF NOT EXISTS `Interactions` (`intId` int(11) NOT NULL auto_increment,"; |
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
consumer.on("interaction", function(obj) { | |
if(obj.data !== undefined) { | |
//console.log(obj.data); | |
io.sockets.emit('data', { | |
source : obj.data | |
}); | |
} | |
}); |
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 | |
if (!function_exists('apache_request_headers')) { | |
function apache_request_headers() { | |
foreach($_SERVER as $key=>$value) { | |
if (substr($key,0,5)=="HTTP_") { | |
$key=str_replace(" ","-",ucwords(str_replace("_"," ",substr($key,5)))); | |
$out[$key]=$value; | |
} | |
} | |
return $out; |
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 | |
class Pages extends CI_Controller { | |
function _remap($method) | |
{ | |
is_file(APPPATH.'views/pages/'.$method.'.php') OR show_404(); | |
$headerdata['title'] = ucfirst($method); | |
$headerdata['nav'] = $this->navigation->load($method); |
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
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L] |
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 | |
// Route ALL requests to the static page handler | |
$route['default_controller'] = "pages"; | |
// All other static pages | |
$route['(:any)'] = "pages/$1"; |
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 if(isset($nav) && !empty($nav)) echo $nav; ?> |
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
/* | |
* http://simple.wikipedia.org/wiki/List_of_cities_in_France | |
* | |
*/ | |
( | |
// GEO | |
interaction.geo geo_polygon "51.08282186160978,2.548828125:50.816347765191075,2.63671875:50.68775800806201,2.900390625:50.78510168548186,3.131103515625:50.53088873891836,3.2794189453125:50.523904629228625,3.4716796875:50.31039245071915,3.71337890625:50.3454604086048,4.031982421875:50.257741984396894,4.2352294921875:50.13466432216696,4.1473388671875:50.06066538593667,4.229736328125:50.01832895590886,4.1473388671875:49.9759551873433,4.1473388671875:49.94061518401988,4.4769287109375:50.004208515595614,4.6746826171875:50.15930523913416,4.7735595703125:50.152266272562684,4.8834228515625:49.97242235423708,4.801025390625:49.85569332253434,4.8614501953125:49.75997752330658,5.0811767578125:49.710272582105695,5.16357421875:49.64273443429918,5.3338623046875:49.48240137826932,5.482177734375:49.55728898983402,5.745849609375:49.44670029695473,6.1083984375:49.468124067331644,6.4434814453125:49.35375571830993,6.580810546875:49.160154652338 |
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
cluster.name: datasift | |
cloud: | |
aws: | |
access_key: *************** | |
secret_key: ************************ | |
region: eu-west-1 | |
discovery: | |
type: ec2 | |
gateway: | |
type: s3 |
OlderNewer