Skip to content

Instantly share code, notes, and snippets.

@ebaynaud
ebaynaud / the-bind-problem.jsx
Created March 1, 2019 09:21 — forked from Restuta/the-bind-problem.jsx
React, removeEventListener and bind(this) gotcha
/* Sometimes it's pretty easy to run ito troubles with React ES6 components.
Consider the following code: */
class EventStub extends Component {
componentDidMount() {
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind
}
componentWillUnmount() {
window.removeEventListener('resize', this.onResize.bind(this));
Live Environment Configuration on Elastic Beanstalk
Ec2-instance type - c1.medium
Ec2 Security Groups - elasticbeanstalk-default, default, GSUI-Base
Monitor Interval - 1 minute
Http Listener port -80
Https Listen ort -443
SSL Certificate ID - rn:aws:iam::228576831886:server-certificate/GeneralSentiment-SSL
Application Health Check URL - /
Health Check Interval (seconds) - 30
@ebaynaud
ebaynaud / create.js
Created December 6, 2017 16:26 — forked from leofmds/create.js
/**
* Module dependencies
*/
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil');
/**
* Create Record
*
* post /:modelIdentity
*
@ebaynaud
ebaynaud / xcode-build-bump.sh
Created February 7, 2017 15:33 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@ebaynaud
ebaynaud / .bash_profile
Last active October 11, 2019 15:11 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# React-Native default editor
export REACT_EDITOR=wstorm
# Path misc
export PATH=/usr/local/opt/node@10/bin:$PATH
#export PATH=/usr/local/opt/node@8/bin:$PATH
#export PATH=/usr/local/opt/node@6/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=/Users/ebaynaud/.config/yarn/global/node_modules/.bin:$PATH
export PATH=/Users/ebaynaud/.yarn/bin:$PATH