Skip to content

Instantly share code, notes, and snippets.


Tamer Shlash TamerShlash

View GitHub Profile
TamerShlash /
Created Dec 12, 2017
Delete all Merge Requests references.
git for-each-ref refs/merge-requests/*/head --format='%(refname)' | \
while read ref
git update-ref -d $ref
TamerShlash / rspec_model_testing_template.rb
Created Nov 30, 2015 — forked from kyletcarlson/rspec_model_testing_template.rb
Rails Rspec model testing skeleton & cheat sheet using rspec-rails, shoulda-matchers, shoulda-callbacks, and factory_girl_rails. Pretty much a brain dump of examples of what you can (should?) test in a model. Pick & choose what you like, and please let me know if there are any errors or new/changed features out there. Reddit comment thread: http…
View rspec_model_testing_template.rb
# This is a skeleton for testing models including examples of validations, callbacks,
# scopes, instance & class methods, associations, and more.
# Pick and choose what you want, as all models don't NEED to be tested at this depth.
# I'm always eager to hear new tips & suggestions as I'm still new to testing,
# so if you have any, please share!
# @kyletcarlson
# This skeleton also assumes you're using the following gems:
TamerShlash / amavisd-new-courier.patch
Last active Aug 29, 2015
Amavisd Courier Patch for Amavisd Version 2.10.1 and Courier Version 0.73.2
View amavisd-new-courier.patch
--- amavisd.ori 2014-12-21 19:49:24.757834955 +0200
+++ amavisd 2014-12-21 20:58:38.581469101 +0200
@@ -107,7 +107,7 @@
# Amavis::Lookup::LDAPattr (the rest)
# Amavis::In::AMPDP
# Amavis::In::SMTP
-#( Amavis::In::Courier )
+# Amavis::In::Courier
# Amavis::Out::SMTP::Protocol
# Amavis::Out::SMTP::Session
TamerShlash / facebook-auto-delete-set-of-group-members.js
Last active Aug 29, 2015 — forked from michaelv/facebook-mass-delete-group-members.js
This JavaScript removes a specified set of Facebook group members. Tested with Google Chrome on 10/10/2014. PLEASE READ the Usage section in the file. Known issues: 1) When Facebook responds slowly, the script might experience hickups 2) Occasionally, the error 'this user is not a member of the group' pops up.
View facebook-auto-delete-set-of-group-members.js
/* Slightly customized version of
1. Put the IDs you want to remove in the globalToBeRemoved array, and make sure
they are strings
2. Go to the group's members page (
3. Paste the code (after adding the IDs to globalToBeRemoved) In the Javascript
console, and then wait until the work is done. It takes a reasonable time.
var globalToBeRemoved = ["10000152515xxxx","10000152515xxxx"];
TamerShlash /
Last active Aug 27, 2016
Install Oracle Java 8 on Ubuntu from Syria (or if Oracle blocks you)
# 1. Use a PROXY and go to and accept the terms then download the tar.gz suitable to your system (32 or 64 bit).
# 2. Move that .tar.gz tarball to the Downloads directory in your home folder.
# 3. run this script as sudo
if [[ $UID != 0 ]]; then
echo "This script neeeds to be run with sudo, like this:"
echo -e "\n sudo $0 $*\n"
exit 1
apt-get install python-software-properties
TamerShlash /
Last active Jun 30, 2017
Arabic translations for Devise v2.2.4
# Additional translations at
confirmed: "لقد تم تأكيد حسابك بنجاح، وتم تسجيل دخولك."
send_instructions: "ستصلك خلال دقائق رسالة على بريدك الإلكتروني تتضمن الخطوات اللازمة لتأكيد حسابك."
send_paranoid_instructions: "إذا كان بريدك الإلكتروني مسجلاً عندنا فستصل إليه خلال دقائق رسالة تتضمن الخطوات اللازمة لتأكيد حسابك."
already_authenticated: "تم تسجيل دخولك مسبقاً."