Skip to content

Instantly share code, notes, and snippets.

View tekkub's full-sized avatar

Tekkub tekkub

View GitHub Profile
/** 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>
@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);
@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 / .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})

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:

<?php
class DisplayHelper extends AppHelper {
var $helpers = array('Html');
/**
*
* Display navigation and detects currect page and adds 'active' class
* to the <li> tag
*
@tekkub
tekkub / blah.md
Created December 31, 2009 20:35 — forked from dschobel/gist:266835

here is the full compile log: http://gist.github.com/266605

the relevant part is:

check/crc32_x86.S:96:suffix or operands invalid for 'push'
check/crc32_x86.S:97:suffix or operands invalid for 'push'
check/crc32_x86.S:98:suffix or operands invalid for 'push'
check/crc32_x86.S:99:suffix or operands invalid for 'push'
check/crc32_x86.S:265:suffix or operands invalid for 'pop'

check/crc32_x86.S:266:suffix or operands invalid for 'pop'

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/main_title" />
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/continue_label" />
<Button
android:layout_width="fill_parent"
@tekkub
tekkub / icalendar.rb
Created June 8, 2010 05:46 — forked from dcparker/icalendar.rb
GCal ruby lib
require 'net/http'
require 'uri'
require 'time'
class Time
def self.gcalschema(tzid) # We may not be handling Time Zones in the best way...
tzid =~ /(\d\d\d\d)(\d\d)(\d\d)T(\d\d)(\d\d)(\d\d)Z/ ? # yyyymmddThhmmss
# Strange, sometimes it's 4 hours ahead, sometimes 4 hours behind. Need to figure out the timezone piece of ical.
# Time.xmlschema("#{$1}-#{$2}-#{$3}T#{$4}:#{$5}:#{$6}") - 4*60*60 :
Time.xmlschema("#{$1}-#{$2}-#{$3}T#{$4}:#{$5}:#{$6}") :
@tekkub
tekkub / mkv2m4v.sh
Created October 11, 2010 03:37 — forked from innerfence/mkv2m4v.sh
mkv to m4v remuxer
#!/bin/bash
#
# mkv2m4v inputfile.mkv
#
# Given an MKV container with H.264 video and AC3 audio, converts
# quickly to an iPad-compatible MP4 container without re-encoding the
# video (so it must already be in an iPad-compatible resolution); the
# audio is downmixed to stereo with Dynamic Range Compression.
#