A curated list of my GitHub stars! Generated by stargazed
この記事はダムアドベントカレンダー4日目の記事です。
群馬県の国道120号線沿いにある丸沼、大尻沼の間に存在しているダムです。
バットレスダムと呼ばれる丸沼ダムが何よりも特徴的なのがそのバットレス構造です。
現存する国内のダムではもう数基しか無いバットレスダムで、写真の通り水圧を支える遮水壁をコンクリート造りの柱と梁で補強するという独特の構造を持っています。
めっちゃかっこいいです。
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
npx create-react-app $1 --template typescript | |
cd $1 | |
yarn add -DE prettier typescript | |
SCRIPTS=$(cat package.json | jq -c $'.scripts + {"fmt":"prettier --write \'**/*.{js,jsx,ts,tsx,json,md}\' --ignore-path .gitignore"}') | |
cat package.json | jq ". + {"scripts": $SCRIPTS}" > package.json.tmp | |
mv package.json{.tmp,} | |
COMPILER_OPTIONS=$(cat tsconfig.json | jq -c $'.compilerOptions + {"noImplicitAny": true}') | |
cat tsconfig.json | jq ". + {"compilerOptions": $COMPILER_OPTIONS}" > tsconfig.json.tmp | |
mv tsconfig.json{.tmp,} | |
git add . |
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
javascript:xp=window.prompt("Input XPath");document.getElementsByXPath=function(t,e){for(var n=[],u=document.evaluate(t,e||document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),a=0,l=u.snapshotLength;a<l;a++)n.push(u.snapshotItem(a));return n};alert(document.evaluate(xp, document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ).snapshotLength);console.log(xp);console.log(document.getElementsByXPath(xp)) |
この記事は 飲酒プログラミング Advent Calendar 2019 11日目の記事です。
本日の飲酒プログラム
友人から台湾旅行土産のビールを頂いたのでそれをつまみにプログラミングです。
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 bash | |
echo "[cache-node_modules] START" | |
CURRENT_DIR_NAME=`basename $(pwd)` | |
BRANCH_FROM=`git reflog show -q | head -n1 | awk '$3 == "checkout:" && $4 == "moving" {print $6}'` | |
BRANCH_TO=`git reflog show -q | head -n1 | awk '$3 == "checkout:" && $4 == "moving" {print $8}'` | |
BRANCH_FROM_CACHE_NAME="/Library/Caches/${CURRENT_DIR_NAME}_${BRANCH_FROM}_node_modules" | |
BRANCH_TO_CACHE_NAME="/Library/Caches/${CURRENT_DIR_NAME}_${BRANCH_TO}_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
export type Option<A> = Some<A> | None<A>; | |
interface IOption<A> { | |
isDefined(): this is IOption<A>; | |
isEmpty(): this is IOption<A>; | |
nonEmpty(): this is IOption<A>; | |
map<B>(f: (val: A) => B): IOption<B>; | |
flatMap<B>(f: (val: A) => Option<B>): Option<B>; | |
forEach(f: (val: A) => void): void; | |
getOrElse(fallback: A): A; |
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
$ npx what-do-i-depend-on | |
npx: 18個のパッケージを6.648秒でインストールしました。 | |
┌──────────────────────────────────────────────────┬────────────────────┐ | |
│ PACKAGE │ COUNT │ | |
├──────────────────────────────────────────────────┼────────────────────┤ | |
│ mocha │ 825 │ | |
├──────────────────────────────────────────────────┼────────────────────┤ | |
│ ava │ 359 │ | |
├──────────────────────────────────────────────────┼────────────────────┤ | |
│ eslint │ 320 │ |
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 * as React from "react"; | |
import createReactContext from "create-react-context"; | |
export interface CirquitContext<State> { | |
state: State; | |
dispatch: Dispatch<State>; | |
} | |
export interface Dispatch<State> { | |
(nextState: State): void; |
NewerOlder