- Video: Andrew Clark: What's Next for React — ReactNext 2016 - YouTube
- Video: Scalable React app architecture [React Bangkok 2.0.0] - YouTube
- Building an Enterprise React Application, Part 1 | Lullabot
- How to avoid refactoring in your first React.js application | Andrej Gajdos
- React Best Practices & Patterns - Sean Saranga Amarasinghe
- React Best Practices and Useful Functions – Nessim Btesh – Medium
- 11 lessons learned as a React contractor – Hacker Noon
- [Characteristics of an
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
function timeout(ms, promise) { | |
let timeoutID; | |
const timeoutPromise = new Promise((_, reject) => { | |
timeoutID = setTimeout(() => { | |
reject(Error(`Operation timed out after ${ms}ms`)) | |
}, ms) | |
}) | |
return Promise | |
.race([promise, timeoutPromise]) | |
.finally(() => { |
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
const value = (obj, prop) => { | |
try { | |
const [property, ...rest] = prop.split(".") | |
return rest.length > 0 | |
? findProp(obj[property], rest.join(".")) | |
: obj[prop] | |
} catch { | |
return obj | |
} | |
} |
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
function powershell(commands) { | |
return new Promise(function (resolve, reject) { | |
const spawn = require("child_process").spawn | |
const child = spawn("powershell.exe", ["-Command", "-"]) | |
const result = [], errors = [] | |
child.stdout.on("data", data => { | |
result.push(data.toString()) | |
}) |
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
function groupped (list, param) { | |
return list.reduce((result, item) => { | |
let prop = item[param] | |
const hasProp = result.hasOwnProperty(prop) | |
if(hasProp) result[prop].push(item) | |
else result[prop] = [item] | |
return result | |
}, {}) | |
} |
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
#!usr/bin/python | |
import sys | |
import hashlib | |
pass_found = False | |
input_hash = sys.argv[1] | |
pass_doc = sys.argv[2] | |
try: |
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
import java.util.Scanner; | |
class Fecha { | |
int dia; | |
int mes; | |
int ano; | |
protected int[] diasPorMes = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; | |
protected int[] diasAcumulados = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; | |
protected int[] diasAcumuladosEnBisiesto = { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335 }; | |
Scanner scan = new Scanner(System.in); |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Email::Send::SMTP::Gmail; | |
my ($mail,$error) = Email::Send::SMTP::Gmail->new( | |
-layer => 'ssl', | |
-port => '465', | |
-smtp => 'smtp.gmail.com', |