- Install iTerm2 from https://www.iterm2.com/
- Install oh-my-zsh from https://ohmyz.sh/ or https://github.com/robbyrussell/oh-my-zsh
- Set iTerm2 theme tab theme to Dark -
Preferences | Appearance | Tabs | Theme > Dark
- Install Fira Code fonts from https://github.com/tonsky/FiraCode (Clone and navigate to
dstr > ttf
, install all font files by double clicking) - Install Powerline fonts from https://github.com/powerline/fonts
- Set fonts for iTerm2 -
Preferences | Profiles | Text
- Change
Font
to14pt Fira code regular
and CheckUse Ligatures
checkbox - Change
Non ASCII Font
to14pt Fira mono
and CheckUse Ligatures
checkbox
- Change
- Install iTerm2 snazzy theme from https://github.com/sindresorhus/iterm2-snazzy
- Navigate to
Preferences | Profiles | Color Presets > Snazzy
- Navigate to
# Compile nginx standalone without root access | |
mkdir ~/installed | |
mkdir ~/installed/nginx | |
mkdir ~/src | |
cd ~/src | |
# PCRE dependency - we'll compile against this statically | |
wget http://kent.dl.sourceforge.net/sourceforge/pcre/pcre-8.42.tar.gz | |
tar -xzvf pcre-8.42.tar.gz |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
machine: | |
node: | |
version: 7 | |
deployment: | |
staging: | |
branch: master | |
owner: my-company | |
commands: | |
- ./deploy-staging.sh | |
production: |
An exploration of the different render methods available in react-enzyme.
Child Component | |
onChangeHandler (val, name) { | |
// Is there anyway that I can share the handler among different Select while keeping in mind that which Select(corresponding to entry) is called ? | |
this.props.onChange(val, name) | |
} | |
render () { | |
<Select name="select1" value={this.props.data["select1"]} options=this.props.options onChange={value => this.onChangeHandler(value, 'select1')} /> | |
<Select name="select2" value={this.props.data["select2"]} options=this.props.options onChange={value => this.onChangeHandler(value, 'select2')} /> | |
<Select name="select3" value={this.props.data["select3"]} options=this.props.options onChange={value => this.onChangeHandler(value, 'select3')} /> | |
<Select name="select4" value={this.props.data["select4"]} options=this.props.options onChange={value => this.onChangeHandler(value, 'select4')} /> |
I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.
If you want to roll up all of these into a single jQuery plugin check out Sharrre
Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.
// Consider <Button /> is a pure render component | |
const AntiPureComponet = () => <div> | |
Call me maybe? | |
<Button><IconPhone /> Call</Button> | |
</div> | |
// When <AntiPureComponet /> renders, it creates a new child (by calling React.createElement) and pass to <Button />. | |
// This behavior forces <Button /> to re-render everytime. |
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
Movies Recommendation:
- MovieLens - Movie Recommendation Data Sets http://www.grouplens.org/node/73
- Yahoo! - Movie, Music, and Images Ratings Data Sets http://webscope.sandbox.yahoo.com/catalog.php?datatype=r
- Jester - Movie Ratings Data Sets (Collaborative Filtering Dataset) http://www.ieor.berkeley.edu/~goldberg/jester-data/
- Cornell University - Movie-review data for use in sentiment-analysis experiments http://www.cs.cornell.edu/people/pabo/movie-review-data/
Music Recommendation:
- Last.fm - Music Recommendation Data Sets http://www.dtic.upf.edu/~ocelma/MusicRecommendationDataset/index.html