Skip to content

Instantly share code, notes, and snippets.

@ebaynaud
ebaynaud / the-bind-problem.jsx
Created Mar 1, 2019 — forked from Restuta/the-bind-problem.jsx
React, removeEventListener and bind(this) gotcha
View the-bind-problem.jsx
/* 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));
View Elastic BeanStalk settings for Live Env
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
View create.js
/**
* Module dependencies
*/
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil');
/**
* Create Record
*
* post /:modelIdentity
*
@ebaynaud
ebaynaud / xcode-build-bump.sh
Created Feb 7, 2017 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
View xcode-build-bump.sh
# 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 Oct 11, 2019 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .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