Skip to content

Instantly share code, notes, and snippets.

View iqbalhasnan's full-sized avatar
:shipit:
shipit

Iqbal Hasnan iqbalhasnan

:shipit:
shipit
  • Kuala Lumpur, Malaysia
  • 05:25 (UTC +08:00)
View GitHub Profile
@iqbalhasnan
iqbalhasnan / Capistrano 3.md
Created August 17, 2016 13:18 — forked from stevenyap/Capistrano 3.md
Capistrano 3 Setup

This guide explains the way to setup a production server using Capistrano.

Setup Capistrano on LOCAL

  • Capistrano is a development gem which assist the developer to run commands on the production server (something like a Heroku toolbelt)
  • Hence, it is installed and configured on developer's computer
# Gemfile

# Use Capistrano for deployment
@iqbalhasnan
iqbalhasnan / capybara cheat sheet
Created April 28, 2016 03:43 — 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')
@iqbalhasnan
iqbalhasnan / index.html
Last active July 7, 2016 00:53
Bootstrap 3 + Salvattore - A jQuery Masonry/Isotope alternative with CSS-driven configuration. See it live here : http://codepen.io/tobsn/pen/EPdejY
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bootstrap 3 + Salvattore Example, A 'jQuery Masonry' alternative with CSS-driven configuration.</title>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="salvattore.css">
</head>
<body>
@iqbalhasnan
iqbalhasnan / gist:18495b8cd60313f826acf980be85dd69
Created June 13, 2016 14:23
Exception in callback of async function: Error: Handler with name 'u' already exists.
Exception in callback of async function: Error: Handler with name 'u' already exists.
Run this to fix above error:
meteor update iron:middleware-stack
@iqbalhasnan
iqbalhasnan / Cloudflare full SSL + NGINX + RAILS
Created January 18, 2015 11:28
NGINX HTTPS AND NON-WWW CLOUDFLARE
BEHAVIOUR:
http://reka.co -> https://reka.co
http://www.reka.co -> https://reka.co
https://www.reka.co -> https://reka.co
MAKE SURE YOU SET CLOUDFLARE SLL TO (FULL STRICT)
upstream unicorn {
server unix:/tmp/unicorn.appsname.sock fail_timeout=0;
}
@iqbalhasnan
iqbalhasnan / cisco_anny_connect.sh
Created March 2, 2016 00:55
Cisco AnyConnect Command Line
# Connect
printf "USERNAME\nPASSWORD\ny" | /opt/cisco/anyconnect/bin/vpn -s connect HOST
# Disconnect
/opt/cisco/anyconnect/bin/vpn disconnect
@iqbalhasnan
iqbalhasnan / gist:8584506
Created January 23, 2014 18:51
generate random password with diceware wordlist
#!/bin/bash
#
# Author: Iqbal Hasnan and Tony Xu at The Ohio State University
# Description: This script generates a secure, easy-to-remembers random passphrase
# based on diceware wordlist and random number from random.org
#
# run: ./passwordgenerator.sh
# check if the diceware wordlist exists in local machine
if [ ! -f diceware.txt ]; then
@iqbalhasnan
iqbalhasnan / gist:7754893
Last active December 30, 2015 01:18
install postgreSQL 9 on Mavericks OSX 10.9 using home-brew
Update Brew:
brew update
Install postgreSQL:
brew install postgresql
Init database:
@iqbalhasnan
iqbalhasnan / gist:f37a78a9f07f401b44bd
Created November 16, 2015 03:24
Failed to click element because of overlapping element
Failed to click element because of overlapping element
change
`page.find("#some_element").click`
to
`page.find("#some_element").trigger("click")`