Alias | Command |
---|---|
g | git |
ga | git add |
gaa | git add --all |
gapa | git add --patch |
gb | git branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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})`; | |
}; |