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 | |
| // Route ALL requests to the static page handler | |
| $route['default_controller'] = "pages"; | |
| // All other static pages | |
| $route['(:any)'] = "pages/$1"; |
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
| RewriteEngine On | |
| RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteRule ^(.*)$ index.php?/$1 [L] |
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 | |
| 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 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 | |
| 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 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
| consumer.on("interaction", function(obj) { | |
| if(obj.data !== undefined) { | |
| //console.log(obj.data); | |
| io.sockets.emit('data', { | |
| source : obj.data | |
| }); | |
| } | |
| }); |
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 | |
| /* 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,"; |
NewerOlder