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 | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# | |
# USAGE: |
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
http://stackoverflow.com/questions/927358/git-undo-last-commit | |
Undo a commit and redo | |
$ git commit ... | |
$ git reset --soft HEAD^ (1) | |
$ edit (2) | |
$ git commit -a -c ORIG_HEAD (3) | |
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset". |
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
SGCallback *callback = [SGCallback callbackWithSuccessBlock: | |
^(id response) | |
{ | |
NSLog(@"Handle Success"); | |
} failureBlock:^(NSError *error) | |
{ | |
NSLog(@"Handle Failure"); | |
}]; |
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
location /resize { | |
alias /tmp/nginx/resize; | |
set $width 150; | |
set $height 100; | |
set $dimens ""; | |
if ($uri ~* "^/resize_(\d+)x(\d+)/(.*)" ) { | |
set $width $1; | |
set $height $2; | |
set $image_path $3; |
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
######################################## | |
##### upstart_virtualenv_test.conf ##### | |
##### install in /etc/init ##### | |
######################################## | |
description "Testing virtualenv and upstart setup" | |
env PYTHON_HOME=/home/steve/.virtualenvs/upstart-test | |
start on runlevel [2345] |
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
#!/usr/bin/env ruby | |
# Backs up the mounted EBS RAID storage used by Couchbase of an EC2 instance using the Scalarium API. | |
# | |
# Before running the snapshot it stops Couchbase disk writes and then freezes the file system. | |
# File system must be XFS. | |
# | |
# Usage: Backup.new(<scalarium api token>, <mount point for ebs raid>, <name of couchbase bucket to back up>).start (must be run on the EC2 instance). | |
require 'rest_client' |
Using WebSockets, React and Reflux together can be a beautiful thing, but the intial setup can be a bit of a pain. The below examples attempt to offer one (arguably enjoyable) way to use these tools together.
This trifect works well if you think of things like so:
- Reflux Store: The store fetches, updates and persists data. A store can be a list of items or a single item. Most of the times you reach for
this.state
in react should instead live within stores. Stores can listen to other stores as well as to events being fired. - Reflux Actions: Actions are triggered by components when the component wants to change the state of the store. A store listens to actions and can listen to more than one set of actions.
Joel Trammell, ex-CEO of NetQOS
- management is power granted by your position
- leadership is power granted freely because of a follower’s perception of your credibility, competence and caring.
Interview at SXSW Interactive 2015. Interviewer: Ted Greenwald from the Wall Street Journal.
- No rigorous, longitudinal study to determine whether Lean Startup is true or not, but he’s hoping there will be.
- A startup is just anything new being created under conditions of extreme uncertainty.
- Use science and not astrology to figure out what’s supposed to happen. That's what is in the book.
- A pivot is just a change in strategy w/o a change in vision.
OlderNewer