Skip to content

Instantly share code, notes, and snippets.

@akeemoduola
akeemoduola / readme.md
Created October 4, 2018 23:21 — forked from yosukehasumi/readme.md
DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

  1. Setup
  2. Swapfile
  3. NGINX
  4. ElasticSearch
  5. RVM
  6. Rails
  7. Postgres
  8. Capistrano
@akeemoduola
akeemoduola / outgoing_emails_with_sendgrid.sh
Created October 4, 2018 17:13 — forked from wnasich/outgoing_emails_with_sendgrid.sh
Install outgoing email from Debian/Ubuntu system through SendGrid
$ sudo apt install postfix mailutils
# Choose host type 'No configuration'
$ sudo cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
$ sudo vi /etc/postfix/main.cf
# Add lines below
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:apikey:paste_your_key_here
smtp_sasl_security_options = noanonymous
@akeemoduola
akeemoduola / easy_rails_deployment_with_capistrano.md
Created October 4, 2018 17:09
Easy Rails deployment with Capistrano

Goals of this tutorial:

  • deploy a new Rails app with capistrano
  • make it fast (total process takes less than 5 minutes)
  • make it simple (no unecessary config)
  • manual ssh to the server not required

Rails application stack:

  • nginx
  • unicorn
  • postgresql
@akeemoduola
akeemoduola / introrx.md
Created April 12, 2018 10:48 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@akeemoduola
akeemoduola / tests_for_toptal_on_codility.py
Created January 15, 2018 23:32 — forked from 1st/tests_for_toptal_on_codility.py
My answers for tests on http://codility.com that I passed for company http://toptal.com I use Python language to solve problems.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Test that I passed on codility.com for TopTal company
#
# Task #1
def binary_gap(N):

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@akeemoduola
akeemoduola / interviewitems.MD
Created September 27, 2017 09:39 — forked from KWMalik/interviewitems.MD
My answers to over 100 Google interview questions

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@akeemoduola
akeemoduola / application_controller.rb
Created July 19, 2017 11:12 — forked from jamesmartin/application_controller.rb
Testing ApplicationController before_filter methods using RSpec's "anonymous" controller instance
class ApplicationController < ActionControllerBase
helper :do_something
def do_something
@from_do_something = params[:for_do_something]
end
end
@akeemoduola
akeemoduola / capybara cheat sheet
Created July 19, 2017 11:05 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@akeemoduola
akeemoduola / Capybara.md
Created July 19, 2017 11:02 — forked from tomas-stefano/Capybara.md
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above