Skip to content

Instantly share code, notes, and snippets.

Litt on code 👨‍💻

Siddhant Nandkishor Pagariya sidpagariya

Litt on code 👨‍💻
Block or report user

Report or block sidpagariya

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Gradient shadow in pure

Gradient shadow in pure CSS

alt text

<button>Let's Go !</button>
jhh /
Created Aug 3, 2016
Solution to exercise 2.
import cv2
import sys
import os
def simple_threshold(path, thresh):
# read in the image
img = cv2.imread(path)
# display the image and wait for key press
jhh /
Last active Sep 1, 2016
Solution to exercise 1.
import cv2
import sys
import os
# usage: python path/to/image.jpg
imgPath = sys.argv[1]
if not os.path.isfile(imgPath):
print("Image file not found.")
brew_cask_command="$brew_command cask"
echo '#!/bin/bash'
echo ''
echo 'trap ctrl_c INT'
echo 'function ctrl_c() {'
echo 'echo "** Trapped CTRL-C"'
aclissold / NSUserDefaults+UIColor.swift
Created Jun 1, 2015
Swift NSUserDefaults UIColor extension
View NSUserDefaults+UIColor.swift
extension NSUserDefaults {
func colorForKey(key: String) -> UIColor? {
var color: UIColor?
if let colorData = dataForKey(key) {
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor
return color
View Sublime Text 3


Important Note

Please use built-in (of Mac OS X) to type and rune the command, do not use another tool (like iTerm2).

Common step after enter run the patch command:

  • After run the commands, start new Sublime Text app, go to Main Menu > Help > Enter License. On the popup type in any text (example "a") and click Use Licence .
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

# remap prefix to Control + a
jamtur01 / generate_navigation.rb
Created May 20, 2012
Auto-generates navigation menu for Jekyll sites using pages based on subdirectories and contents
View generate_navigation.rb
# Auto-generates navigation
# {% generate_navigation %}
require 'pathname'
module Jekyll
class Page
def source_path
File.join(@dir, @name).sub(%r{^/*},'')
You can’t perform that action at this time.