- Martin Fowler: "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior"
- Opionated developer: renaming source files
- Minimalistic developer: removing source files
- Badass developer: rewriting everything from scratch
- Technical lead: calls it 'improving' instead, to avoid scaring the management
- Project manager: fixing previous mistakes
- Product manager: time when no new features get done
- CEO: slacking
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/env node | |
const spawnAsync = require("@expo/spawn-async"); | |
const assert = require("assert"); | |
const childProcess = require("child_process"); | |
const crossSpawn = require("cross-spawn"); | |
function profileExecSync() { | |
console.time("execSync"); | |
const output = childProcess.execSync("xcodebuild -version").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
import { inspect } from 'util'; | |
import { | |
graphql, | |
GraphQLEnumType, | |
GraphQLID, | |
GraphQLInterfaceType, | |
GraphQLObjectType, | |
GraphQLList, | |
GraphQLNonNull, | |
GraphQLSchema, |
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/env node | |
const terminalLink = require('terminal-link'); | |
console.log(); | |
console.log('# Link'); | |
console.log(terminalLink("I'm a link, click me.", 'https://expo.fyi/manifest-url')); | |
console.log(); | |
console.log('# URL:'); | |
console.log("Here's a URL: https://expo.fyi/manifest-url"); |
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
Show hidden characters
{ | |
"plugins": [ | |
"syntax-jsx", | |
["transform-react-jsx", { "pragma": "frzr.el" }] | |
], | |
"presets": ["es2015"] | |
} |
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
Verifying my Blockstack ID is secured with the address 1FborCiWomnCbAfgVb5sdvUB3tM5jdpWJk https://explorer.blockstack.org/address/1FborCiWomnCbAfgVb5sdvUB3tM5jdpWJk |
- Style elements inline in JSX via the
style
prop, without any wrapping. No (mandatory) "presentational components" orStyleSheet
.
style
prop allows for compatibility withreact-primitives
, React Native components and many 3rd party components. The Primitives (View
,Text
,Image
...) are designed to work cross-platform (web, Android, iOS...) and they provide convenient defaults for Flexbox based layout.- I want to add these elements in JSX, style them inline and only name and extract them to separate component when it becomes necessary, not upfront. Extracting to a named component can be as simple as adding
const Wrapper = () =>
before the JSX element. No new syntax for creating a component.
- Support vendor prefixes, pseudo classes, media queries, CSS variables...
- Support things like
@media (-webkit-min-device-pixel-ratio: 2)
,:hover
, or `var(--panel-back
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
tuo onPelkistettyOlio paikasta 'ala-ajatusviiva/onPelkistettyOlio' | |
tuo $$havaittava paikasta 'merkki-havaittava' | |
vie vakio TekoTyypit = { | |
ALUSTA: '@@redux/ALUSTA' | |
} | |
vie oletus funktio luoVarasto(vähentäjä, esikuormitettuTila, tehostaja) { | |
jos ( | |
sentyyppi esikuormitettuTila === 'funktio' && |
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 { Failure, Success } from 'data.validation'; | |
// Report unhandled promise rejections (bugs) | |
window.onunhandledrejection = (event) => { | |
// Raven.captureException(event.reason); | |
console.error('Unhandled rejection:', event.reason); | |
}; | |
function fetchRepo(name) { | |
return fetch(`https://api.github.com/repos/${name}`).then((response) => |
Gist
NewerOlder