find . -maxdepth 1 -name "*.pdf" -print0 | xargs -0 rm
Clarification: There are two default shell settings. | |
One is the Unix setting and can be changed with chsh -s. | |
The other is the Terminal.app-specific setting, and can be changed in Terminal preferences. | |
You can set your Terminal default shell command to /bin/bash -l in the Terminal app. | |
-l tells Bash to read startup files. Even if you don't have any user-specific startup files, there are system-wide startup files that will, among other things, set the prompt to the one you're familiar with. | |
If you've properly set your Unix default shell, you should be able to select Default login shell in Terminal preferences and this will happen automatically. |
def generate_secure_s3_url(s3_key) | |
# | |
# s3_key would be a path (including filename) to the file like: "folder/subfolder/filename.jpg" | |
# but it should NOT contain the bucket name or a leading forward-slash | |
# | |
# this was built using these instructions: | |
# http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?S3_QSAuth.html | |
# http://aws.amazon.com/code/199?_encoding=UTF8&jiveRedirect=1 | |
s3_base_url = MyApp::Application::S3_BASE_URL # i.e. https://mybucket.s3.amazonaws.com |
if [ -z "$SSH_AUTH_SOCK" ] ; then | |
eval `ssh-agent -s` | |
ssh-add ~/.ssh/delivery | |
fi | |
if [ -f ~/.bashrc ]; then | |
source ~/.bashrc | |
fi | |
sudo apt-get update;sudo apt-add-repository -y ppa:rael-gc/scudcloud;sudo apt-get update;sudo apt-get install scudcloud;sudo apt-get install hunspell-en-us;sudo dpkg-divert --add --rename --divert /opt/scudcloud/resources/scudcloud.png.real /opt/scudcloud/resources/scudcloud.png;sudo cp ~/Downloads/scudcloud.png /opt/scudcloud/resources/;sudo chmod +r /opt/scudcloud/resources/scudcloud.png |
In an excerpt from a 1994 Rolling Stone interview, Jobs explains what object-oriented programming is.
Jeff Goodell: Would you explain, in simple terms, exactly what object-oriented software is?
Steve Jobs: Objects are like people. They’re living, breathing things that have knowledge inside them about how to do things and have memory inside them so they can remember things. And rather than interacting with them at a very low level, you interact with them at a very high level of abstraction, like we’re doing right here. Here’s an example: If I’m your laundry object, you can give me your dirty clothes and send me a message that says, “Can you get my clothes laundered, please.” I happen to know where the best laundry place in San Francisco is. And I speak English, and I have dollars in my pockets. So I go out and hail a taxicab and tell the driver to take me to this place in San Francisco. I go get your clothes laundered, I jump back in the cab, I get back here. I give you your clean clothes and say,
# Tmux Config | |
tm() { tmux new -s "$1" ;} | |
ta() { tmux attach -t "$1"; } | |
tl() { tmux list-sessions; } | |
tn() { tmux new-window; } |