# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
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
class Admin::Local::LocationsController < Admin::BaseController | |
def index | |
@locations = Local::Location.page(params[:page]).per(params[:limit]) | |
end | |
into | |
class Admin::Local::LocationsController < Admin::BaseController | |
def index |
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
# Ignore metadata | |
.DS_Store | |
*.svn* | |
Thumbs.db | |
# Ignore /logs directory contents | |
/logs/* | |
!/logs/.htaccess | |
# Ignore /temp directory contents |
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
<? | |
$nodes = array(); | |
$params = array(); | |
$parents = $this->page->navigation_parents(false); | |
foreach($parents as $parent) { | |
$page_obj = Cms_Page::findByUrl($parent->url, $params); | |
$add_node = true; | |
switch($page_obj->action_reference) { |
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
#!/usr/bin/env python | |
"""A Python git pre-commit script. | |
Install the script by putting it in .git/hooks/ directory in your project | |
directory. The script file must be called "pre-commit". Make sure the | |
executable flag in the script file is set. The script assumes you are building | |
your project with make. | |
You can bypass the check with the "--no-verify" flag to git commit.""" |
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
<? | |
class Tweak_Module extends Core_ModuleBase { | |
private $cms_update_element; | |
private $is_rendering_started; | |
protected function create_module_info() { | |
$info = new Core_ModuleInfo( | |
"Tweak", | |
"Provides assistance developing themes for your store.", |
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 Road | |
* | |
* JavaScript/CSS resources combining | |
* | |
* @package PHPRoad | |
* @author Aleksey Bobkov | |
*/ |
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
<VirtualHost *:80> | |
ServerAlias site-* | |
UseCanonicalName Off | |
VirtualDocumentRoot "/ude/repo/%0/www" | |
<Directory "/ude/repo/"> | |
Options Includes FollowSymLinks | |
AllowOverride All | |
Order allow,deny | |
Allow from all |
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 testclass { | |
public $_r; | |
public function __construct() { | |
} |
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 testclass { | |
protected $_r; | |
public function __construct() { | |
$this->getr(); |