Skip to content

Instantly share code, notes, and snippets.

View moharnadreza's full-sized avatar
🐢

Mohammadreza Ziadzadeh moharnadreza

🐢
View GitHub Profile
@ryanlindsey
ryanlindsey / git_plugin.md
Created October 14, 2015 23:55
Git plugin shortcuts for Oh My ZSH
Alias Command
g git
ga git add
gaa git add --all
gapa git add --patch
gb git branch
@lvnam96
lvnam96 / getRandomDarkHSLColor.js
Created September 4, 2017 06:27
Generate random dark HSL color (CSS) in JavaScript
const getRandomColor = () => {
const h = Math.floor(Math.random() * 360),
s = Math.floor(Math.random() * 100) + '%',
l = Math.floor(Math.random() * 60) + '%';// max value of l is 100, but I set to 60 cause I want to generate dark colors
// (use for background with white/light font color)
return `hsl(${h},${s},${l})`;
};
@arastu
arastu / current_track.applescript
Last active November 27, 2020 19:52
update twitter bio and add current playing song from Spotify to it
on escape_quotes(string_to_escape)
set AppleScript's text item delimiters to the "\""
set the item_list to every text item of string_to_escape
set AppleScript's text item delimiters to the "\\\""
set string_to_escape to the item_list as string
set AppleScript's text item delimiters to ""
return string_to_escape
end escape_quotes
tell application "Spotify"
#!/bin/bash
set -e
# !!!ONLY FOR MACOS!!!
# This script helps you to bypass VPN for specific CIDRs and domain names by adding a direct route to the default gateway for them.
# It also can be used to setup a killswitch. When killswitch is enabled, Only IP traffic to the VPN server (and other bypassed CIDRs) is allowed, All other packets would be dropped.
# Killswitch is powered by MacOS internal packet filter (PF) firewall.
# How to use?