Skip to content

Instantly share code, notes, and snippets.

View amrnt's full-sized avatar

Amr Tamimi amrnt

View GitHub Profile
# coding: utf-8
class Animal
def initialize(اسم)
@اسم = اسم
end
def اكتب_اسم_الحيوان
puts @اسم

Keybase proof

I hereby claim:

  • I am amrnt on github.
  • I am amrnt (https://keybase.io/amrnt) on keybase.
  • I have a public key ASDPTkMh2cg8Z8IE_ejqYweyjzODhsRJZIkupTvH_WDkago

To claim this, I am signing this object:

@amrnt
amrnt / flutter-gource.sh
Created June 24, 2018 11:01 — forked from branflake2267/flutter-gource.sh
Flutter gource visualization commands. Visualizing the commit history with gource.
#!/bin/sh
# gource
# https://gource.io/
# flutter
# https://github.com/flutter
# 1. clone or git pull all repos
ROOT
assets/
javascripts/
application.js
biz.js.coffee
bar.js.coffee
stylesheets/
application.css
baz.css.scss
foo.css.scss

Keybase proof

I hereby claim:

  • I am amrnt on github.
  • I am amrnt (https://keybase.io/amrnt) on keybase.
  • I have a public key ASCtVau4Z9I3c7J1-c677tsXv-WiF32Kdlc1fMYyGZ6d_Qo

To claim this, I am signing this object:

@amrnt
amrnt / enum.rb
Last active December 31, 2015 21:59
Make enum accepts `nil`. Add method `reset_#{enum}!`
module ActiveRecord
# Declare an enum attribute where the values map to integers in the database, but can be queried by name. Example:
#
# class Conversation < ActiveRecord::Base
# enum status: [ :active, :archived ]
# end
#
# # conversation.update! status: 0
# conversation.active!
# conversation.active? # => true
#require 'rubygems'
require 'pp'
#require 'ap' # Awesome Print
class Object
# expects [ [ symbol, *args ], ... ]
def recursive_send(*args)
args.inject(self) { |obj, m| obj.send(m.shift, *m) }
end
end
val text = """Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation pal pal ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute pal irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in Pal culpa qui officia deserunt mollit anim id est laborum.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
@amrnt
amrnt / Gemfile
Created June 22, 2013 10:20
Ruby Ramallah - Day II
source "https://rubygems.org/"
gem 'sinatra'
gem 'nokogiri'
@amrnt
amrnt / pr.md
Created March 25, 2013 13:44 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: