Skip to content

Instantly share code, notes, and snippets.

View oelmekki's full-sized avatar

kik oelmekki

View GitHub Profile
(function($)
{
/**
* Get a cookie
* @param string
* @return string
*/
function getCookie( name )
{
var nameEQ = name + "=";
(function($)
{
/**
* Get a cookie
* @param string
* @return string
*/
function getCookie( name )
{
var nameEQ = name + "=";
" File: tab_alternate.vim
" Author: Olivier El Mekki
" Email: olivier@el-mekki.com
" Description: script allow to switch to the last seen tab, as the screen C-a a
" Usage:
" :Tabalter - go to the last seen tab
if exists('tab_alternate_plugin')
finish
endif
#!/usr/bin/env ruby
require 'rubygems'
require 'rubygems/gem_runner'
require 'rubygems/exceptions'
require 'readline'
module Gem
class StreamUI
def say( statement = '' )
@@buffer ||= []
#!/usr/bin/env bash
if [[ -z $1 ]]; then
echo 'you must specify a shortcut name'
exit
fi
dir="$(pwd)"
echo "$1=\"$dir\"" >> ~/.bashrc
" taken from http://www.vim.org/tips/tip.php?tip_id=860
" CountMatches counts the number of times a pattern matches a
" range of lines
function! CountMatches(pattern, startline, endline) range
let l:match_count = 0
let l:restore_cursor = "normal!" . line(".") . "G" . virtcol(".") . "|"
normal! H
let l:restore_screen = line(".") . "normal!zt"
#!/bin/sh
#
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
#
# To enable this hook, rename this file to "pre-commit".
HOOK_PATH=$(dirname $(readlink -f "$0"))
tmp="$HOOK_PATH"/../..
<?php
class Foo
{
public function __construct()
{
sleep( 1 );
}
}
/**
* TableSorter
* @param: options (request,action,destination,prev,next,rows,method,head)
* @return void;
*/
var TableSorter = new Class({
Implements: [Options],
options:{
request: '', action: '', destination: '', prev: '', next: '', rows: 50, method: 'get', head: ''
},