Skip to content

Instantly share code, notes, and snippets.

View awinabi's full-sized avatar
🎯
Focusing

Awin Abi awinabi

🎯
Focusing
View GitHub Profile
@awinabi
awinabi / bill.rb
Created April 3, 2013 16:27
ActiveRecord Callbacks correction
class Bill < ActiveRecord::Base
attr_accessible :name
before_validation :bvm
after_validation :avm
before_save :bsm
around_save :arsm
after_save :asm
install zlib1-dev
libxslt
libreadline-dev
openssl
i
apt-get -y update
apt-get -y install git build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
@awinabi
awinabi / database-creation-postgres.sh
Created August 19, 2015 08:39
Postgres Database Creation
#####################################################
### Setup database
#####################################################
# start your database as follows
sudo /etc/init.d/postgresql start
# create user
sudo -u postgres createuser -l -D -S -R sduser
# create database
sudo -u postgres createdb -O sduser successdart_development
sudo -u postgres createdb -O sduser successdart_test
@awinabi
awinabi / ToDo-September
Last active September 8, 2015 07:16
ToDo September
#### Template
**TODO**
- [ ] Develop some code
**Team**
- [ ] Make the team awesome!
@awinabi
awinabi / Gemfile
Last active September 14, 2015 04:38
Rails Performance Testing
gem 'rails-perftest'
gem 'ruby-prof' # for MRI profiling
@awinabi
awinabi / successdart-mina.rb
Created May 18, 2016 19:01
Mina for SD in AWS
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'
require 'mina/unicorn'
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
@awinabi
awinabi / install-comodo-ssl-cert-for-nginx.rst
Created May 24, 2016 12:41 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@awinabi
awinabi / ssl_puma.sh
Last active October 21, 2016 14:13 — forked from tadast/ssl_puma.sh
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
# 3) Generate the csr (Certificate signing request) (Details are important!)
@awinabi
awinabi / one.rb
Last active December 23, 2018 13:24
Duplex is a ready to deploy, mobile and web application - powered by Ionic 3 and Ruby on Rails. Namespacing is a way of bundling logically related objects together. https://bit.ly/dupl3x
print 'hello world'