Skip to content

Instantly share code, notes, and snippets.


Salimane Adjao Moustapha salimane

  • Agbara Mimo, Ajili Africa, Meltwater
  • Africa, Benin, Rwanda, Ghana, Kenya, China
View GitHub Profile
View gist:9ae6696cdb05cd09bd94b3db7df8ee35
Verifying my Blockstack ID is secured with the address 13oMJgQp8t3RaMqGueKv1ATJGN2qxP5kfa

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets


Keybase proof

I hereby claim:

  • I am salimane on github.
  • I am salimane ( on keybase.
  • I have a public key whose fingerprint is 3101 567D 7E8C 85AC 0A9A B1AC 83FE 3620 0A5E EE80

To claim this, I am signing this object:

# installs to /opt/gradle
# existing versions are not overwritten/deleted
# seamless upgrades/downgrades
# $GRADLE_HOME points to latest *installed* (not released)
mkdir /opt/gradle
wget -N${gradle_version}
unzip -oq ./gradle-${gradle_version} -d /opt/gradle
ln -sfnv gradle-${gradle_version} /opt/gradle/latest
View gist:9f3c77f6365b3a13c4ab
sudo wget -O /etc/yum.repos.d/epel-apache-maven.repo
sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo
sudo yum install -y apache-maven
mvn --version
salimane / db_convert_to_utf8mb4.rake
Last active Aug 29, 2015
Convert any MySQL 5.5.3+ database into real utf8 (utf8mb4) in Rails - RUN=1 rake db:convert_to_utf8mb4
View db_convert_to_utf8mb4.rake
# The tables that should be ignored
# The tables should have their charset changed,
# but with no asociated AR model, thus columns will not be modified
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
View patch-edid.rb
# Create display override file to force Mac OS X to use RGB mode for Display
# see
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
salimane / gist:8958411
Last active Aug 29, 2015
ruby slow regex match
View gist:8958411
salimane at Salimanes-MacBook-Pro in ~
⚛ ruby --version
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
salimane at Salimanes-MacBook-Pro in ~
⚛ cat regex.rb
regex = %r{^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$}
link = ""
puts link =~ regex
View gist:7304939

Unicorn memory usage improvement with Ruby 2.0.0

Here's a preliminary experiment to see how much memory is saved with the new copy-on-write friendly (bitmap marking) GC.

Calculated by memstats.rb on Debian x86_64.

Master process:

# ./memstats.rb 20547
You can’t perform that action at this time.