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
In celebration of Whyday: Rubyists always want to show others the beautiful code | |
they have created, hence the question: Has Anybody Seen My Code? | |
Has Anybody Seen My Code | |
(sung to the tune of Has Anybody Seen My Gal) | |
Clean and small, works for all, | |
Ruby is my all in all. | |
Has anybody seen my code? |
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 | |
IFS=$(echo -en "\n\b") | |
# Ensure we are in a git repo with gitignore. | |
if [ ! -d .git ]; then echo "Current working directory is not a git repository."; exit -1; fi | |
#if [ ! -f .gitignore ]; then echo "Current working directory has no .gitignore file."; exit -2; fi | |
# Sort (by date) and save new files | |
for file in `git status --porcelain --untracked-files=all | grep -v '.log$' | grep '^?? ' | sed 's/^?? //g'` | |
do |
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/sh | |
echo "What should the Application be called (no spaces allowed e.g. GCal)?" | |
read inputline | |
name="$inputline" | |
echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
read inputline | |
url="$inputline" |