Skip to content

Instantly share code, notes, and snippets.

View tekkub's full-sized avatar

Tekkub tekkub

View GitHub Profile
<?php
class DisplayHelper extends AppHelper {
var $helpers = array('Html');
/**
*
* Display navigation and detects currect page and adds 'active' class
* to the <li> tag
*

Sorry for this fairly weird communications style, but I didn’t know how to contact you reliably otherwise.

My email is [email protected] if you’d like to respond that way.

I thought about our exchange all night, could hardly sleep. It’s always disconcerting when people disagree with me in ways that I don’t understand.

I think I may now understand where we see things differently. I’m curious to see what you think of this.

Ezra’s quote which you said criticized Github’s code is this:

@tekkub
tekkub / .bashrc
Created August 21, 2009 00:03 — forked from defunkt/.bashrc
Tweet from bash shell, with length check
# $ tweet Hi mom!
#
# Put this in ~/.bashrc or wherever.
# If it doesn't work, make sure your ~/.netrc is right
#
# (Thanks to @anildigital and @grundprinzip for curl-fu)
function tweet {
string=$*
LEN=$(echo ${#string})
@tekkub
tekkub / gist:77362
Created March 11, 2009 07:30 — forked from chad/gist:76951
# How to find out where a method comes from.
# Learned this from Dave Thomas while teaching Advanced Ruby Studio
# Makes the case for separating method definitions into
# modules, especially when enhancing built-in classes.
module Perpetrator
def crime
end
end
class Fixnum
@tekkub
tekkub / users.php
Created January 31, 2009 20:44 — forked from walesmd/gist:55497
class Users extends Controller {
function Users() {
parent::Controller();
$this->load->model('user');
}
function profile($username = FALSE) {
$data['user'] = $this->user->get($username);
$this->load->view('users/profile', $data);
/** Fast String - Voice Technology
* Simple char[] substitute with faster appender.
* Fernando Gregianin Testa <[email protected]>
* v0.1 - Usando no provider v2. 2007-02-22
*/
#ifndef FSTRING_
#define FSTRING_
#include <stdlib.h>