Skip to content

Instantly share code, notes, and snippets.

View harryobas's full-sized avatar

Harry Obaseki harryobas

View GitHub Profile
@harryobas
harryobas / README.md
Created April 26, 2018 13:58 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@harryobas
harryobas / config.rb
Created April 19, 2018 18:32 — forked from guiman/config.rb
Example mina deploy script using docker
require 'mina/git'
require 'mina/nginx'
set :application, 'your_app_name'
set :domain, 'your_server'
set :user, 'ubuntu'
set :deploy_to, '/location/to/deploy'
set :app_path, "#{deploy_to}/#{current_path}"
set :repository, 'your_repo'
set :branch, 'master'
@harryobas
harryobas / run_long_process_in_background.rb
Created September 16, 2017 00:47 — forked from ChengLong/run_long_process_in_background.rb
Run Background Process in Sinatra
require 'sinatra'
get '/long_process' do
child_pid = Process.fork do
# hard work is done here...
sleep 10
Process.exit
end
@harryobas
harryobas / FIRST
Created September 12, 2017 22:07 — forked from nakajima/FIRST
Guide on how to invoke a method in Ruby.
Here's an example of a few different ways to call a method on a Ruby object.
If you're a beginner, try running the code above to watch it in action.
If you're not a beginner, go ahead and tear me a new one for whichever techniques I forgot ;)
- Pat