Skip to content

Instantly share code, notes, and snippets.

View oelmekki's full-sized avatar

kik oelmekki

View GitHub Profile
@oelmekki
oelmekki / user_info.rb
Created November 4, 2012 16:42 — forked from apneadiving/solution.rb
quizz
class UserInfo
attr_accessor :contact
delegate :name, :mail, :phone, to: :contact
def initialize(contact = nil)
self.contact = contact
end
end
@oelmekki
oelmekki / go_out.rb
Created May 19, 2012 11:29
kik goes out
#!/usr/bin/env ruby
class Person
attr_accessor :name
def initialize(name)
@name = name
@go_out = 0
end
@oelmekki
oelmekki / flexion.rb
Created October 7, 2011 22:50 — forked from MaximeD/flexion.rb
flexion.rb
#!/usr/bin/ruby
# encoding: utf-8
class Grammar
Pronoms = [ "je", "tu", "il/elle", "nous", "vous", "ils/elles" ] ;
Terminaisons_1 = [ "e", "es", "e", "ons", "ez", "ent" ] ;
Terminaisons_2 = [ "is", "is", "it", "issons", "issez", "issent" ] ;
def conjugate( verb )
@oelmekki
oelmekki / flexion.rb
Created October 7, 2011 20:41 — forked from MaximeD/flexion.rb
flexion.rb
#!/usr/bin/ruby
pronoms = [ "je", "tu", "il/elle", "nous", "vous", "ils/elles" ] ;
terminaisons_1 = [ "e", "es", "e", "ons", "ez", "ent" ] ;
terminaisons_2 = [ "is", "is", "it", "issons", "issez", "issent" ] ;
def conjugator
puts "Les formes du verbe " + verb + " au présent de l'indicatif sont :\n"
inf = verb.gsub(/.{2}$/, "")
@oelmekki
oelmekki / gist:1203444
Created September 8, 2011 13:48 — forked from tekkub/gist:1203061
Git aliases to prune merged branches
[alias]
prunelocal = !sh -c 'git branch --merged | grep -v "^*" | xargs git branch -d'
pruneorigin = !sh -c 'git branch -r --merged | grep \"^ origin/\" | grep -v "/master$" | sed "s/origin./:/g" | xargs git push origin'