Skip to content

Instantly share code, notes, and snippets.

View kannans's full-sized avatar
💻
☝️

Kannan S kannans

💻
☝️
View GitHub Profile
@kannans
kannans / 1 Gist conventions
Created November 6, 2017 06:01 — forked from PavloBezpalov/1 Gist conventions
Deploy Rails 4.2.6 to VPS(Ubuntu 14.04.4 LTS). Nginx, Puma, Capistrano3, PostgreSQL.
<<USER>> <<APP>> change this variables
@kannans
kannans / rails http status codes
Created June 1, 2017 13:26 — forked from mlanett/rails http status codes
HTTP status code symbols for Rails
HTTP status code symbols for Rails
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings.
Status Code Symbol
1xx Informational
100 :continue
101 :switching_protocols
102 :processing
@kannans
kannans / gist:fb66121e67b7cfb9038fc758192f9d95
Created February 3, 2017 18:35 — forked from shripadk/gist:552554
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
@kannans
kannans / multiple_ssh_setting.md
Created December 1, 2016 05:24 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@kannans
kannans / Auto-complete-style.scss
Last active June 15, 2016 04:10 — forked from daz/style.scss
Bootstrap styling for jQuery UI autocomplete
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
_width: 160px;
padding: 4px 0;
@kannans
kannans / gist:edd2cc5977bc2d41bb39
Created October 7, 2015 11:15 — forked from bbugh/gist:3882746
Accessing alert box in JavaScript with Capybara/rails/rspec
//Get a reference to the alert using the following:
alert = page.driver.browser.switch_to.alert
// and then hit OK with
page.driver.browser.switch_to.alert.accept
// or dismiss it with
@kannans
kannans / capybara cheat sheet
Last active August 29, 2015 14:26 — 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')
@kannans
kannans / digital_ocean_setup.md
Last active August 29, 2015 14:26 — forked from ChuckJHardy/digital_ocean_setup.md
DigitalOcean Ubuntu 14.04 x64 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions
### USAGE
###
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
### ElasticSearch version
@kannans
kannans / nginx.conf
Last active August 29, 2015 14:22 — forked from billie66/nginx.conf
# This file should be placed on the directory of ~/blog/config
upstream unicorn {
server unix:/tmp/unicorn.todo.socket fail_timeout=0;
}
server {
listen 80 default;
#server_name example.com;
root /home/username/blog/public;