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 | |
# h/t Roger Chen, http://code.rogerhub.com/terminal-fu/53/backing-up-dropbox-with-rsync/ | |
DIR=$HOME/Dropbox | |
read -p "The target directory is: $DIR. Correct? [yn] " -n 1 | |
if [[ $REPLY =~ ^[Yy]$ ]];then | |
if [ -d $DIR ];then | |
echo -e "\n" | |
rsync -vauzh --progress --exclude '.dropbox*' --delete $DIR home:~/backup/dropbox |
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
git checkout desired_branch // put in the name of the branch you wish to KEEP | |
git merge -s ours branch_to_be_replaced // put in the name of the branch you want to OVERWRITE | |
git checkout branch_to_be_replaced // put in the name of the branch you want to OVERWRITE | |
git merge desired_branch // put in the name of the branch you wish to KEEP |
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
// ==UserScript== | |
// @name MyFitnessPal Input Focus | |
// @namespace http://www.rgbink.com/ | |
// @version 0.1 | |
// @author Anthony DeCrescenzo | |
// @match http*://www.myfitnesspal.com/food/diary* | |
// @grant none | |
// @description A script to automatically focus on the quantity input field when editing a food entry. So, if you click to edit a food item, when the popup appears the quantity will be highlighted, ready to be replaced/typed over. | |
// ==/UserScript== |
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
tell application "Google Chrome" | |
-- edit the following url to be as specific or generic as you wish | |
-- in my functioning script I've added the particular spreadsheet that I wish to close | |
set windowList to every tab of every window whose URL starts with "https://docs.google.com/spreadsheets/" | |
repeat with tabList in windowList | |
set tabList to tabList as any | |
repeat with tabItr in tabList | |
set tabItr to tabItr as any | |
delete tabItr | |
end repeat |
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
// basic US, no country code | |
((\(*\d{3}\)* *?)|(\d{3}[ -\.]*))?\d{3}[ -\.]*\d{4} | |
// leading country codes and optional repeat separators | |
^\s*(?:\+?(\d{1,3}))?[-. (]*(\d{3})[-. \/)]*(\d{3})[-. ]*(\d{4})(?: *x(\d+))?\s*$ |
OlderNewer