Collection of most used git commands
git help everyday
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; } |
express -c stylus <project_name>
cd <project_name>
npm install
npm start