Skip to content

Instantly share code, notes, and snippets.

View sidpagariya's full-sized avatar
💭
👨‍💻

Siddhant Nandkishor Pagariya sidpagariya

💭
👨‍💻
View GitHub Profile
@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active October 12, 2024 17:02
Gradient shadow in pure CSS

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@jhh
jhh / ex_002.py
Created August 3, 2016 15:33
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
jhh / ex_001.py
Last active September 1, 2016 01:31
Solution to exercise 1.
import cv2
import sys
import os
# usage: python ex_001.py path/to/image.jpg
imgPath = sys.argv[1]
if not os.path.isfile(imgPath):
print("Image file not found.")
sys.exit()
#!/bin/bash
brew_command=/usr/local/bin/brew
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
aclissold / NSUserDefaults+UIColor.swift
Created June 1, 2015 14:52
Swift NSUserDefaults UIColor extension
extension NSUserDefaults {
func colorForKey(key: String) -> UIColor? {
var color: UIColor?
if let colorData = dataForKey(key) {
color = NSKeyedUnarchiver.unarchiveObjectWithData(colorData) as? UIColor
}
return color
}
@laptrinhcomvn
laptrinhcomvn / Sublime Text 3 cheating.md
Last active November 17, 2023 06:53
Sublime Text 3 patching

Ref: https://gist.github.com/vertexclique/9839383

Important Note

Please use built-in Terminal.app (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 .
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active November 15, 2024 09:51
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

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
jamtur01 / generate_navigation.rb
Created May 20, 2012 21:28
Auto-generates navigation menu for Jekyll sites using pages based on subdirectories and contents
# Auto-generates navigation
# {% generate_navigation %}
#
require 'pathname'
module Jekyll
class Page
def source_path
File.join(@dir, @name).sub(%r{^/*},'')