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
/* | |
example require.js setup file | |
*/ | |
var G5 = window.G5 || { | |
photo_editor: false | |
}; | |
require.config({ | |
baseUrl: base_url, |
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 casper = require('casper').create({ | |
clientScripts: ["c:/phantomjs/casperjs/includes/jquery.js"] | |
}); | |
var cnt = 0, tots = 666; | |
var param = { | |
'duration[from]':115, | |
'duration[to]':375, | |
'numberOfFlights':300, |
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
/* | |
requirejs optimization setup config file | |
howto: node r.js -o build.js | |
*/ | |
({ | |
//appDir : '../', | |
baseUrl : '../js', | |
dir : '../release', | |
name: 'main', |
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
/* search twitter hash */ | |
url: http://search.twitter.com/search.json?page=6&max_id=286412943002836992&q=%23GALAXYCamHoliday&rpp=99&include_entities=1&result_type=mixed | |
docs: https://dev.twitter.com/docs/api/1/get/search | |
/* twitter user */ | |
https://api.twitter.com/1/users/lookup.json?screen_name=devyfriend&include_entities=true | |
/* fb share */ | |
function posttofb(){ |
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 (defined('BASEPATH')) OR exit('No direct script access allowed'); | |
/* load the MX_Router class */ | |
require APPPATH."third_party/MX/Router.php"; | |
class MY_Router extends MX_Router { | |
function _set_routing() | |
{ | |
// Are query strings enabled in the config file? Normally CI doesn't utilize query strings |
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 ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Exceptions extends CI_Exceptions { | |
public function __construct() | |
{ | |
parent::__construct(); | |
} | |
function show_404($message = "The page you requested was not found.") |
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
<script> | |
/* | |
note: | |
- dont forget to set ckfinder/config.php $baseUrl for userfiles folder | |
- in ckfinder/config.php, set the function CheckAuthentication(){ return true; } to enable file browsing | |
*/ | |
var div = $('textarea[name=blog_body]').get(0); | |
var editor = CKEDITOR.replace( div, | |
{ | |
filebrowserBrowseUrl : base_url + 'assets/ckfinder/ckfinder.html?id=demo3', |
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
$referer = isset($_SERVER['HTTP_REFERER']) ? parse_url($_SERVER['HTTP_REFERER']) : false; | |
$scheme = isset($referer['scheme']) ? $referer['scheme'] : 'http'; | |
$config['base_url'] = $scheme.'://'.$_SERVER['HTTP_HOST'].'/'; | |
$config['scheme_url'] = $scheme; | |
$config['asset_url'] = $config['base_url'].'assets/'; | |
$config['index_page'] = ''; // empty it |
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
Options -Indexes | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond $1 !^(index\.php|img|css|js|robots\.txt) |
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
/* httpd.conf */ | |
Listen 91 | |
<Virtualhost *:91> | |
ServerName localhost | |
ServerAdmin me@me.com | |
DirectoryIndex index.html index.php | |
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" comonvhost | |
CustomLog logs/access_log_99.txt comonvhost | |
DocumentRoot "d:/wamp/www/whatever/" |
OlderNewer