Skip to content

Instantly share code, notes, and snippets.

View oelmekki's full-sized avatar

kik oelmekki

View GitHub Profile
$(function(){
$( '#rechercher' ).focus( function(){
var $this = $( this );
if ( $this.val() == 'rechercher' ){
$this.val( '' );
}
});
$( '#rechercher' ).blur( function(){
var $this = $( this );
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (buildd@palmer) Fri Apr 9 10:35:18 UTC 2010
Section "Files"
EndSection
Section "ServerFlags"
Option "AutoAddDevices" "false"
Option "DontZap" "true"
Option "AllowEmptyInput" "true"
kik@central ~/tmp/flash $ git clone https://github.com/mootools/mootools-runner.git
Initialized empty Git repository in /home/kik/tmp/flash/mootools-runner/.git/
remote: Counting objects: 786, done.
remote: Compressing objects: 100% (442/442), done.
remote: Total 786 (delta 400), reused 635 (delta 304)
Receiving objects: 100% (786/786), 238.43 KiB | 15 KiB/s, done.
Resolving deltas: 100% (400/400), done.
kik@central ~/tmp/flash $ cd mootools-runner/
kik@central ~/tmp/flash/mootools-runner (master) $ git submodule update --init
Submodule 'JSTD-Adapter' (git://github.com/cpojer/jasmine-jstd-adapter.git) registered for path 'JSTD-Adapter'
var Foo = function(){
this._id = null;
};
Foo.prototype.__defineSetter__( "id", function( id ){
this._id = id;
});
Foo.prototype.__defineGetter__( "id", function(){
return this._id;
#!/usr/bin/env ruby
require 'pathname'
require 'find'
RUNNER_DIR = File.expand_path( File.join( File.dirname(__FILE__ ), '..', 'Specs', 'Runner' ))
SOURCE_DIR = File.expand_path( File.join( File.dirname(__FILE__ ), '..', 'Source' ))
SPECS_DIR = File.expand_path( File.join( File.dirname(__FILE__ ), '..', 'Specs' ))
class AutoSpec
def initialize( *dirs_to_check )
#!/usr/bin/env php
<?php
// you can pass this script to PHP CLI to convert your file.
// or uncomment these lines to use the argc and argv passed by CLI :
if ($argc >= 3) {
$src = $argv[1];
$out = $argv[2];
} else {
echo 'you must specify a source file and a result filename',"\n";
/*
---
name: ProtectedTester
description: Mixin that provides a mean to test protected methods. Simply implement it, add test with addTest() and run with runTests()
license: MIT-style license.
author: Olivier El Mekki
snippet rres
match '${1:resource}s' => '$1s#index'
match '$1/:id' => '$1s#show', :as => :$1
match '$1/:id/new' => '$1s#new', :as => :new_$1, :method => :get
match '$1/:id/create' => '$1s#create', :as => :create_$1, :method => :post
match '$1/:id/edit' => '$1s#edit', :as => :edit_$1, :method => :get
match '$1/:id/update' => '$1s#update', :as => :update_$1, :method => :post
match '$1/:id/delete' => '$1s#delete', :as => :delete_$1
setenv HOME $APP
chdir $HOME/app/models
screen -t "models"
chdir $HOME/app/views
screen -t "views"
chdir $HOME/app/controllers
screen -t "controllers"
#!/usr/bin/env bash
pos=$1
if [[ $pos == 'right' ]]; then
recordmydesktop --x=1920 --width=1360 --height=768
elif [[ $pos == 'left' ]]; then
recordmydesktop --width=1920 --height=1080
fi