#React tutorials
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
http://blog.benoitvallon.com/tips/flattening-arrays-in-javascript/ | |
http://rainsoft.io/how-three-dots-changed-javascript/ | |
http://reactivex.io/learnrx/ |
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
happy: [":)", ":-)", ":->"] | |
,sad: [":(", ":-(", ":-<"] | |
,grin: [":D", ":-D"] | |
,wink: [";)", ";-)"] | |
,surprise: [":O", ":-O", ":-o", ":o"] | |
,tongue: [":P", ":-P", ":p", ":-p"] | |
,shades: ["B)", "B-)"] | |
,angry: ["X(", "X-(", ":@", ":-@", "x(", "x-("] | |
,crying: [":'(", ":,("] | |
,indifferent: [":|", ":-|"] |
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
:grinning:" : 0x1f600, | |
":grin:" : 0x1f601, | |
":joy:" : 0x1f602, | |
":smiley:" : 0x1f603, | |
":smile:": 0x1f604, | |
":sweat_smile:" : 0x1f605, | |
":laughing:": 0x1f606, | |
":innocent:": 0x1f607, | |
":smiling_imp:": 0x1f608, | |
":wink:": 0x1f609, |
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
describe("getTweets", function () { | |
var fakeData = [ | |
{ | |
created_at: "Fri Apr 05 19:39:30 +0000 2013", | |
text: "tweet 1", | |
retweeted: false, | |
favorited: false, | |
user: { name: "name 1" } | |
}, | |
/* ... */ |
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
Show hidden characters
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : true, // true: Identifiers must be in camelCase | |
"curly" : true, // true: Require {} for every new block or scope |
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 init(){ | |
localConnection = new RTCPeerConnection(SERVER); | |
localConnection.onicecandidate = function(event){ | |
event.candidate && remoteConnection.addIceCandidate(event.candidate); | |
}; | |
dataChannel = localConnection.createDataChannel("sendDataChannel"); | |
dataChannel.onerror = handleError; | |
//dataChannel.onmessage = function(event){console.log("message recieved" + event.data);} | |
dataChannel.onopen = function(){console.log("Hello world dataChannel is now open");} |
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
Rule 1: use var . (avoid globals) | |
Rule 2: Use THIS_IS_A_CONSTANT | |
Rule 3: Use Semicolons and the end of variable and function expressions ( and not function declarations) | |
Rule 4 : function declarations within blocks | |
//DONT if(x){ | |
function foo() | |
} |
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
pwd | |
hostname | |
mkdir | |
cd | |
cp | |
mv | |
less | |
cat | |
xargs | |
find |
NewerOlder