Skip to content

Instantly share code, notes, and snippets.

It may have escaped your notice but life isn't fair.

Junaid Farooq ijunaid8989

It may have escaped your notice but life isn't fair.
  • Islamabad Pakistan
View GitHub Profile
ijunaid8989 / capybara cheat sheet
Last active September 17, 2015 06:54 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
View WordpressStyelSheet.css
Theme Name: loops-inter
Theme URI:
Author: Compass Inc
Author URI:
Description: Themes is being developed by Junaid Farooq
Version: 1.0
License: GNU General Public License v2 or later
License URI:
Tags: black, brown, orange, tan, white, yellow, light, one-column, two-columns, right-sidebar, flexible-width, custom-header, custom-menu, editor-style, featured-images, microformats, post-formats, rtl-language-support, sticky-post, translation-ready
ijunaid8989 / Gemfile
Last active October 9, 2015 10:38
My Default for Rails App.
View Gemfile
source ''
gem 'rails', 'XXXX'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
View DB
id integer NOT NULL DEFAULT nextval('sq_streams'::regclass),
created_at timestamp with time zone NOT NULL DEFAULT now(),
updated_at timestamp with time zone NOT NULL DEFAULT now(),
exid text NOT NULL,
owner_id integer NOT NULL,
is_public boolean NOT NULL,
config json NOT NULL,
name text NOT NULL,
ijunaid8989 / JS Styles
Created December 21, 2015 12:18
View JS Styles
A little glance on what world is using right now
[WordPress JS Coding Styles](
[JQuery Officials](
[Google Coding Style](
View AJX
$("#merge_datatables").on 'click', '.action-cam', ->
host = $(this).parents('tr').find('td:nth-child(1)').text()
port = $(this).parents('tr').find('td:nth-child(2)').text()
jpg = $(this).parents('tr').find('td:nth-child(3)').text()
d = {} = host
d.port = port
d.jpg = jpg
View Cron with Whenever gem
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
# Using similar syntax as the appdeploy pre hooks that is managed by AWS
set -xe
View index.html
<!DOCTYPE html>
<html >
<meta charset="UTF-8">
<title>WEATHER API</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet prefetch' href='">
View Column show hide with datatable not Datatable
fnShowHide = (iCol, oTable) ->
bVis = oTable.fnSettings().aoColumns[iCol].bVisible
oTable.fnSetColumnVis iCol, if bVis then false else true
View password.ex
defmodule Password do
@regex_for_mac ~r/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/
def generate(mac_address) do
case check_mac(mac_address) do
{:invalid, message} ->
{:ok} ->
password =