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
var asyncYouTubeApiLoad = function() { | |
//https://developers.google.com/youtube/iframe_api_reference | |
// This code loads the IFrame Player API code asynchronously. | |
var tag = document.createElement('script'); | |
tag.src = "https://www.youtube.com/iframe_api"; | |
var firstScriptTag = document.getElementsByTagName('script')[0]; | |
firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); | |
}; | |
var initiateVideoTracking = function() { |
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
module.exports = function( grunt ) | |
{ | |
// Project configuration | |
grunt.initConfig( { | |
pkg: grunt.file.readJSON( "package.json" ), | |
watch: | |
{ | |
livereload: { | |
options: {livereload: true}, | |
files: ['source/**/*'] |
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
// Had issues with CORS when implementing different post types and changing headers in node/express/angular.$http, this works even though it still gives me the CORS error. | |
$.ajax({ | |
type: "POST", | |
username: "[ACCOUNT_SID]", | |
password: "[AUTH_TOKEN]", | |
url: "https://api.twilio.com/2010-04-01/Accounts/[SID_HERE]/SMS/Messages", | |
xhrFields: { | |
withCredentials: true | |
}, |
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
dirMod.directive( "stateselectmenu", function () | |
{ | |
return { | |
restrict: "A", | |
template: "<option value='AL'>Alabama</option><option value='AK'>Alaska</option><option value='AZ'>Arizona</option><option value='AR'>Arkansas</option> <option value='CA'>California</option> <option value='CO'>Colorado</option> <option value='CT'>Connecticut</option> <option value='DE'>Delaware</option> <option value='DC'>District Of Columbia</option> <option value='FL'>Florida</option> <option value='GA'>Georgia</option> <option value='HI'>Hawaii</option> <option value='ID'>Idaho</option> <option value='IL'>Illinois</option> <option value='IN'>Indiana</option> <option value='IA'>Iowa</option> <option value='KS'>Kansas</option> <option value='KY'>Kentucky</option> <option value='LA'>Louisiana</option> <option value='ME'>Maine</option> <option value='MD'>Maryland</option> <option value='MA'>Massachusetts</option> <option value='MI'>Michigan</option> <option value='MN'>Minnesota</option> <option value='MS'>Mississippi</option> < |
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
Video: [How to start a startup](https://www.youtube.com/watch?v=CBYhVcO4WgI) | |
Notes by: [philipDS](https://news.ycombinator.com/user?id=philipDS) | |
# 4 critical parts: Idea, Team, Product, Execution | |
## 1. Idea | |
-> Good startups take about 10 years | |
-> Startup should feel like an important mission |
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://jeff-collins.github.io/ment.io/#/ | |
var emojis = [ | |
{ "label" : "bowtie" }, | |
{ "label" : "smile" }, | |
{ "label" : "laughing" }, | |
{ "label" : "blush" }, | |
{ "label" : "smiley" }, | |
{ "label" : "relaxed" }, | |
{ "label" : "smirk" }, |
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
var $updatePasswordContainer = $( ".update-password" ), | |
$savePasswordBtn = $( ".save-password" ); | |
$cancelEditBtn = $( ".cancel-password" ); | |
var updatePasswordSection = { | |
toggle: function( parentEl, initialValue ) | |
{ | |
if ( $updatePasswordContainer.hasClass( "editing" ) ) | |
{ |
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
var $updatePasswordContainer = $( ".update-password" ), | |
$savePasswordBtn = $( ".save-password" ); | |
$cancelEditBtn = $( ".cancel-password" ); | |
var updatePasswordSection = { | |
toggle: function( parentEl, initialValue ) | |
{ | |
if ( $updatePasswordContainer.hasClass( "editing" ) ) | |
{ |
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
var $updatePasswordContainer = $( ".update-password" ), | |
$savePasswordBtn = $( ".save-password" ), | |
$cancelEditBtn = $( ".cancel-password" ); | |
var updatePasswordSection = { | |
toggle: function( parentEl, initialValue ) | |
{ | |
if( $updatePasswordContainer.hasClass( "editing" ) ) | |
{ |
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
Lifecycle Methods | |
componentWillMount – Invoked once, on both client & server before rendering occurs. | |
componentDidMount – Invoked once, only on the client, after rendering occurs. | |
shouldComponentUpdate – Return value determines whether component should update. | |
componentWillUnmount – Invoked prior to unmounting component. | |
Specs | |
getInitialState – Return value is the initial value for state. | |
getDefaultProps – Sets fallback props values if props aren’t supplied. |
OlderNewer