title | description | author |
---|---|---|
<!-- anti anti click bait --> |
<!-- write with humanity --> |
<!-- whoami/team/squad/personal --> |
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
type checkNumber = int; | |
type cardNumber = string; | |
type cardType = | |
| Visa | |
| Mastercard; | |
type creditCardInfo = (cardNumber, cardType); |
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
export const getMaxCallStack = () => { | |
let i=0; | |
function rec(){ | |
i++; rec(); | |
} | |
try {rec();} catch(e){}finally{return i} | |
} |
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
// remove-consoles.js | |
// run with command jscodeshift -t remove-consoles.js src/**/*.js | |
export default (fileInfo, api) => { | |
const j = api.jscodeshift; | |
return j(fileInfo.source) | |
.find(j.CallExpression, { | |
callee: { | |
type: 'MemberExpression', | |
object: { type: 'Identifier', name: 'console' }, |
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
// ISSUE https://www.facebook.com/permalink.php?story_fbid=2923264041231670&id=100006443087773 | |
// we have some data with item is | |
// { id: number, name: string, jumlahDonasi: number } | |
const data = [ | |
{ | |
id: 1, | |
name: "c", | |
jumlahDonasi: 2000, | |
}, | |
{ |
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
// UNCOMMENT when run in node | |
// let fetch = require("node-fetch"); | |
let GQL_URI = "https://api.graphql.jobs/"; | |
let query = `query{ | |
jobs{ | |
title | |
description | |
company{ | |
name |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
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
// @broerjuang https://discordapp.com/channels/735469928378925156/736199426309226536/767813964285214812 | |
// parser -> Parser Generator || Parser Combinator | |
open ReludeParse.Parser; | |
let input = " | |
filterBy Category = \"'fantasy'\" | |
orderBy Rating desc | |
skip 5 | |
take 10 | |
"; |
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
🗣 Commented on #1 in antonybudianto/next-code-antonybudianto | |
🗣 Commented on #1 in ri7nz/rescript-chakra | |
💪 Opened PR #1 in ri7nz/rescript-chakra | |
🎉 Merged PR #8 in evilfactorylabs/learning-resources | |
🗣 Commented on #8 in evilfactorylabs/learning-resources |