Skip to content

Instantly share code, notes, and snippets.

Emba Moussa embasbm

Block or report user

Report or block embasbm

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ruby-on-rails-engineer-solved.rb
require 'faker'
# Question 1 #
View lessons-sources
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
View console testing
B: JSON.stringify(dataLayer.find(x => x['event'] === 'eeProductDetail'), null, 20)
C: JSON.stringify(dataLayer.find(x => x['eventAction'] === 'displayForm'), null, 20)
A: JSON.stringify(dataLayer.find(x => x['event'] === 'addToCart'), null, 20)
D: JSON.stringify(dataLayer.find(x => x['eventAction'] === 'sentForm'), null, 20)
embasbm /
Created Oct 27, 2016 — forked from tomysmile/
Installing memcached on Mac with Homebrew and Lunchy

Installing memcached on Mac with Homebrew and Lunchy

This is a quick guide for installing memcached on a Mac with Homebrew, and starting and stopping it with Lunchy. I hope this tutorial will get your memcached up and running in no time.

Step 1 — Install Homebrew

Installing Homebrew is super easy. Just paste this in your terminal —

$ ruby -e "$(curl -fsSL"
embasbm / catch up
Created Apr 25, 2016
Catch up 25-04-2016
View catch up
- build with only one item returned.
* auto link:
1 - link user with the offer they give back when user is just beeing created. (in this worked we dont care if the user has a card)
2 - (other worker) link all users with all offers (no matter when both are created) (user must have attached card)
* retailers:
1 - when retailers is created, check all his offers and link them to all our current users
embasbm / Gemfile.lock
Created Mar 31, 2016
sidekiq not showing "INFO: Starting processing" when using capistrano-sidekiq
View Gemfile.lock
capistrano-sidekiq (0.5.4)
sidekiq (>= 3.4)
sidekiq (4.1.1)
concurrent-ruby (~> 1.0)
connection_pool (~> 2.2, >= 2.2.0)
redis (~> 3.2, >= 3.2.1)
embasbm / Dockerfile
Last active Feb 12, 2016
docker-compose failing example
View Dockerfile
FROM ruby:2.2.0
RUN apt-get update -qq && apt-get install -y build-essential
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
ADD . /myapp
View lazy_iterator.rb
natural_numbers = do |yielder|
number = 1
loop do
yielder.yield number
number += 1
You can’t perform that action at this time.