Chord diagrams show directed relationships among a group of entities. This example also demonstrates simple interactivity by using mouseover filtering. Layout inspired by Martin Krzywinski's beautiful work on Circos.
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
<?php | |
require_once "vendor/autoload.php"; | |
use Symfony\Component\Console\Application; | |
use Illuminate\Database\Console\Migrations; | |
use Pimple\Container; | |
$container = new Container(); | |
$container['migration-table'] = 'migration'; |
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 this before | |
// npm run eslint > lint.log | |
const fs = require('fs'); | |
let data = fs.readFileSync('./lint.log', 'utf8'); | |
let output = {}; | |
for (let line of data.split('\n')) { |
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
node_modules |
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
# remove all the git branches with update in it | |
git rmf $(git ls | grep update | tr '\n' ' ') | |
# get version from package.json. may not work with 1.0.0-alpha.1 | |
PKG_VERSION=$(node -e "console.log(require('./package.json').version);") | |
MAJOR_VERSION="$(echo $PKG_VERSION | cut -d "." -f 1)" | |
MINOR_VERSION="$(echo $PKG_VERSION | cut -d "." -f 2)" | |
PATCH_VERSION="$(echo $PKG_VERSION | cut -d "." -f 3)" | |
# vscode tab issue fix |
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 transformer<T extends ts.Node>(): ts.TransformerFactory<T> { | |
return context => { | |
const visit: ts.Visitor = node => { | |
switch (node.kind) { | |
case ts.SyntaxKind.Parameter: | |
if (!(node as any).type) { | |
const newNode = ts.createParameter( | |
(node as ts.ParameterDeclaration).decorators, | |
(node as ts.ParameterDeclaration).modifiers, | |
(node as ts.ParameterDeclaration).dotDotDotToken, |
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
// StringsContext.tsx | |
import { createContext } from "react"; | |
// initialize the context | |
const StringsContext = createContext({}); | |
// props for StringsContextProvider | |
export interface StringsContextProviderProps { | |
data: Record<string, any>; | |
} | |
// a wrapper for `StringsContext.Provider` for better API | |
export function StringsContextProvider( |
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
// strings.yaml.d.ts | |
declare const strings: Record<string, string>; | |
export default strings; |
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
homePageTitle: Home | |
aboutPageTitle: About | |
homePageContent: | |
para1: | | |
Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam, eos | |
animi. Corporis harum quaerat dicta possimus illum aut unde laborum | |
excepturi suscipit quibusdam perspiciatis dolorum alias, exercitationem | |
similique illo? Distinctio. | |
para2: | | |
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Reprehenderit |
OlderNewer