This file contains hidden or 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
| #BaseOrganizer | |
| module BaseOrganizer | |
| def self.included(base) | |
| base.class_eval do | |
| include BaseInteractor | |
| extend Interactor::Organizer::ClassMethods | |
| include Interactor::Organizer::InstanceMethods | |
| end | |
| end |
This file contains hidden or 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
| import * as types from '../actions/types'; | |
| export const addTodo = text => dispatch => dispatch({type: types.ADD_TODO, text}); | |
| export const deleteTodo = id => dispatch => dispatch({type: types.DELETE_TODO, id}); | |
| export const editTodo = (id, text) => dispatch => dispatch({type: types.EDIT_TODO, id, text}); | |
| export const completeTodo = id => dispatch => dispatch({type: types.COMPLETE_TODO, id}); | |
| export const clearCompleted = () => dispatch => dispatch({type: types.CLEAR_COMPLETED}); | |
| export const showAll = () => dispatch => dispatch({type: types.SHOW_ALL}); | |
| export const showActive = () => dispatch => dispatch({type: types.SHOW_ACTIVE}); | |
| export const showCompleted = () => dispatch => dispatch({type: types.SHOW_COMPLETED}); |
This file contains hidden or 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
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| PS1="\[\033[1;91m\]\u:\[\033[1;94m\]\w\[\033[1;91m\]\$(parse_git_branch)\[\033[1;90m\]\$ " |
This file contains hidden or 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
| # download and unpack distribution | |
| wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.6-linux-x86_64.tar.bz2 | |
| tar xf phantomjs-1.9.6-linux-x86_64.tar.bz2 | |
| # copy binary | |
| cd phantomjs-1.9.6-linux-x86_64 | |
| cp bin/phantomjs /usr/local/bin |
This file contains hidden or 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
| # You have your csv data and it looks like so... It's in a file named "my_data.csv" and we want to import it into a table named "my_things". | |
| "1", "Something", "0.50", "2013-05-05 10:00:00" | |
| "2", "Another thing", "1.50", "2013-06-05 10:30:00" | |
| # Now you want to import it, go to the command line and type: | |
| $ PGPASSWORD=PWHERE psql -h HOSTHERE -U USERHERE DBNAMEHERE -c "\copy my_things FROM 'my_data.csv' WITH CSV;" | |
| # Voila! It's impoted. Now if you want to wipe it out and import a fresh one, you would do this: |
This file contains hidden or 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
| curl -O -L https://dl.bintray.com/mitchellh/packer/packer_0.7.5_darwin_amd64.zip | |
| unzip packer_0.7.5_darwin_amd64.zip | |
| sudo mv packer_0.7 /usr/local/packer | |
| sudo chown $USER /usr/local/packer/ | |
| # then update your .bash_profile with the new path e.g.: | |
| # export PATH="/usr/local/git/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/local/packer:$PATH" |