This file contains hidden or 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
verify_programs() { | |
local programs="$1" | |
local ccyan="\\033[1;36m" | |
local cnormal="\\0033[0;39m" | |
abort=0 | |
for p in $programs; do | |
type $p >/dev/null 2>&1 || { echo -e >&2 " ${ccyan}${p}${cnormal} required but it's not installed. Aborting."; abort=1; } | |
done | |
if [[ $abort -eq 1 ]]; then | |
exit 1; |
This file contains hidden or 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
defaultBoldFontName | |
defaultDimmedTextColor | |
defaultEmphasizedFontName | |
defaultFontName | |
defaultSelectedTextShadowColor@1x | |
defaultSelectedTextShadowColor@2x | |
defaultShadowOffset | |
defaultTextColor | |
defaultTextShadowColor | |
defaultTextShadowColor@2x |
This file contains hidden or 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
github-open-url='git remote -v | grep fetch | grep -oE '\''https://github.com/\S+'\'' | xargs -I{} open {}' |
This file contains hidden or 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 | |
# ./pushover.sh -t "Pushover via Bash" -m "Pushover message sent with bash from $(hostname -f)" -p1 -s siren -u http://www.google.com -n "Google" | |
USER_TOKEN=YOUR_USER_TOKEN_HERE | |
# YOUR APPS TOKENS / UPPERCASE NAME WITH _TOKEN (usage: "-a monitor" uses MONITOR_TOKEN) | |
MONITOR_TOKEN=APP_TOKEN | |
BACKUP_TOKEN=APP_TOKEN | |
ALERT_TOKEN=APP_TOKEN | |
APP_LIST="monitor, backup, alert" # FOR USAGE |
This file contains hidden or 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
# Split and export a QuickTime Movie | |
# Create a folder "exports" on the desktop | |
# Open one movie file in QuickTime | |
# Configure where you want to cut the video, if you want first and last part and the QuickTime window name (after modification) | |
# Launch this script and wait | |
#------------- BEGIN OF CONFIGURATION -------- | |
-- Middle Mark : Set where you want to cut the video (in seconds) |
This file contains hidden or 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
# Check until host is UP | |
checkisup () { while (true) do if ping -t 2 -c 1 $1 &>/dev/null; then echo -e " $(date +%T) \\033[1;36m Host $1 is up! \\033[0m\n $(ping -c 1 $1 | head -n2 | tail -n1)"; return 0; else echo -e " $(date +%T) \\033[31m Host $1 is down...\\033[0m"; sleep 1; fi; done; } |
This file contains hidden or 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 | |
servername=$(echo "$@" |sed 's/ /-/g') | |
if [ "$servername" == "" ]; then | |
echo "Please specify a server name like: myserver.com" | |
exit | |
fi | |
if [ -f "$servername.key" ] || [ -f "$servername.crt" ]; then |
This file contains hidden or 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 | |
# usage: git-sync-upstream "/your/git/folder/" [rebase/merge] | |
action="merge" | |
if [ $# -ge 1 ]; then cd "$1"; fi | |
if [ $# -eq 2 ]; then if [ "$2" = "rebase" ]; then action="rebase"; fi; fi | |
clear; |
This file contains hidden or 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 | |
# Write category for an app | |
developer="public.app-category.developer-tools" | |
utilities="public.app-category.utilities" | |
productivity="public.app-category.productivity" | |
photography="public.app-category.photography" | |
video="public.app-category.video" | |
music="public.app-category.music" |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[ | |
# Dropzone Action Info | |
# Name: ${1:Name} | |
# Description: ${2:Description} | |
# Handles: ${3:Files, Text} | |
# Creator: ${4:Creator Name} | |
# URL: ${5:Creator URL} | |
# OptionsNIB: ${6:Login, ExtendedLogin, APIKey, UsernameAPIKey, ChooseFolder, ChooseApplication, GoogleAuth} | |
# LoginTitle: ${7:Login Title (For Login NIB)} |