Skip to content

Instantly share code, notes, and snippets.

View highruned's full-sized avatar
💭
Forging...

HighRuned highruned

💭
Forging...
View GitHub Profile
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
@highruned
highruned / README.markdown
Created April 27, 2012 19:10 — forked from Yavari/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # 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
@highruned
highruned / .gitignore
Created February 29, 2012 21:52
.gitignore for LemonStand (keeping LS version controlled)
# Ignore metadata
.DS_Store
*.svn*
Thumbs.db
# Ignore /logs directory contents
/logs/*
!/logs/.htaccess
# Ignore /temp directory contents
@highruned
highruned / gist:1888794
Created February 23, 2012 00:47
LemonStand Partial - site:breadcrumb
<?
$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) {
@highruned
highruned / pre-commit
Created February 21, 2012 00:16
General Pre-Commit Hook
#!/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."""
<?
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.",
<?
/**
* PHP Road
*
* JavaScript/CSS resources combining
*
* @package PHPRoad
* @author Aleksey Bobkov
*/
<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
@highruned
highruned / gist:1244335
Created September 27, 2011 04:15
sadas
<?php
class testclass {
public $_r;
public function __construct() {
}
@highruned
highruned / gist:1244320
Created September 27, 2011 04:05
trying to fix php leak
<?php
class testclass {
protected $_r;
public function __construct() {
$this->getr();