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
Run only tests that has .only or all of them if there's no .only | |
grep --exclude-dir=node_modules -rl . -e 'test.only\|it.only\|describe.only' --null | tr '\n' ' ' | xargs -0 npx jest | grep . || npx jest | |
clear && grep --exclude-dir=node_modules -rl . -e 'test.only\|it.only\|describe.only' --null | tr '\n' ' ' | xargs -0 npx jest --coverage=false |
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
{ | |
"abk": { | |
"iso-639-2": "abk", | |
"iso-639-1": "ab", | |
"english": "Abkhazian", | |
"french": "abkhaze", | |
"german": "Abchasisch" | |
}, | |
"ace": { | |
"iso-639-2": "ace", |
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
{ | |
"ab": { | |
"iso-639-2": [ | |
"abk" | |
], | |
"iso-639-1": "ab", | |
"english": "Abkhazian", | |
"french": "abkhaze", | |
"german": "Abchasisch" | |
}, |
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
// https://www.iso.org/obp/ui/#search | |
const isoCountryCodes = [ | |
{name: 'Andorra', alphaTwoCode: 'AD', alphaThreeCode: 'AND', numeric: '020'}, | |
{name: 'United Arab Emirates', alphaTwoCode: 'AE', alphaThreeCode: 'ARE', numeric: '784'}, | |
{name: 'Afghanistan', alphaTwoCode: 'AF', alphaThreeCode: 'AFG', numeric: '004'}, | |
{name: 'Antigua and Barbuda', alphaTwoCode: 'AG', alphaThreeCode: 'ATG', numeric: '028'}, | |
{name: 'Anguilla', alphaTwoCode: 'AI', alphaThreeCode: 'AIA', numeric: '660'}, | |
{name: 'Albania', alphaTwoCode: 'AL', alphaThreeCode: 'ALB', numeric: '008'}, | |
{name: 'Armenia', alphaTwoCode: 'AM', alphaThreeCode: 'ARM', numeric: '051'}, | |
{name: 'Angola', alphaTwoCode: 'AO', alphaThreeCode: 'AGO', numeric: '024'}, |
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 = { | |
/** | |
* Print Width | |
* https://prettier.io/docs/en/options.html#print-width | |
* | |
* Specify the line length that the printer will wrap on. | |
* | |
* printWidth: <int> | |
* default: 80 | |
*/ |
Don't force the reader of your code to scroll past the minutiae.
function makeBreakfast() {
const ingredients = fetchIngredients();
const friedBacon = fryBacon(ingredients.bacon);
const cookedScrambledEggs = whiskEggsAndFryThem(ingredients.eggs);
const preparedMeal = plateAndSeasonMeal(friedBacon, cookedScrambledEggs);
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
;; Assign typescript-mode to .tsx files | |
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)) | |
(require 'mmm-mode) | |
(setq mmm-global-mode t) | |
(setq mmm-submode-decoration-level 0) ;; Turn off background highlight | |
;; Add css mode for CSS in JS blocks | |
(mmm-add-classes | |
'((mmm-styled-mode |
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
// roughish AMP attribute types for JSX/TypeScript | |
// Source: https://playground.amp.dev/amphtml-hint.json | |
// https://github.com/Microsoft/TypeScript/issues/15449 | |
// https://stackoverflow.com/questions/50585952/typescript-and-google-amp-property-amp-img-does-not-exist-on-type-jsx-intrin | |
import * as React from 'react'; | |
// why null ? | |
type _ANY = any; | |
type _ANYS = any; | |
declare module 'react' { | |
interface HTMLAttributes<T> { |
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
// ==UserScript== | |
// @name BitMex USD Converter | |
// @namespace https://bitmex.com/ | |
// @version 0.13 | |
// @description Get some sanity into your gambling. | |
// @author koinkraft, modified by @Jolly - https://www.twitter.com/Jolly | |
// @grant none | |
// @include https://bitmex.com/* | |
// @include https://www.bitmex.com/* | |
// @require https://code.jquery.com/jquery-2.1.4.min.js |
NewerOlder