Object.keys等のstaticメソッドがES6で挙動が変わったことで面倒なことになってる話
ES5でプリミティブを受け取ると例外を投げていたObject.keys等のメソッドが、ES6では例外を吐かなくなった。
Object.getPrototypeOf ( O )Object.getOwnPropertyDescriptor ( O, P )
Protect container instance with containers running from scale-in. Uses aws-cli set-instance-protection. Inspired by: https://stackoverflow.com/questions/45020323/ecs-asg-scaling-down-policy-recommendations
Ignores ecs-agent and dd-agent when counting running containers. You can add more in containers_running in the script below.
| #!/bin/bash | |
| # | |
| # Check package.json and npm install after git checkout. | |
| # Put this to .git/hooks/post-checkout | |
| # | |
| PREVIOUS_HEAD=$1 | |
| NEW_HEAD=$2 | |
| BRANCH_SWITCH=$3 |
プライベートフィールドがハッシュな変態記法なのは何でなんだぜ?
class Point {
#x;
#y;
constructor(x = 0, y = 0) {| #!/bin/sh | |
| sudo apt-get install fontforge fonts-inconsolata | |
| mkdir -p ~/.fonts | |
| TMPDIR=$(mktemp -d /tmp/ricty-XXXXX) | |
| cd $TMPDIR | |
| wget http://iij.dl.sourceforge.jp/mix-mplus-ipa/59022/migu-1m-20130617.zip |
| # derived from https://yoshiori.hatenablog.com/entry/2021/04/13/171405 | |
| AIR_PODS_ADDRESS="aa-aa-aa-aa-aa-aa" | |
| AIR_PODS_NAME="XXX AirPods Pro" | |
| /usr/local/bin/bluetoothconnector -c $AIR_PODS_ADDRESS | |
| for ((i=0 ; i<10 ; i++)) | |
| do | |
| if [ "Connected" == "$(/usr/local/bin/bluetoothconnector -s $AIR_PODS_ADDRESS)" ]; then | |
| # sleep 0.5 |
| /// <reference path="typings/node/node.d.ts" /> | |
| /// <reference path="typings/typescript/typescript.d.ts" /> | |
| import ts = require("typescript"); | |
| import fs = require("fs"); | |
| import path = require("path"); | |
| function transform(contents: string, libSource: string, compilerOptions: ts.CompilerOptions = {}) { | |
| // Generated outputs | |
| var outputs = []; |
| /** | |
| * @author ebidel@ (Eric Bidelman) | |
| * License Apache-2.0 | |
| * | |
| * Shows how to use Puppeeteer's code coverage API to measure CSS/JS coverage across | |
| * different points of time during loading. Great for determining if a lazy loading strategy | |
| * is paying off or working correctly. | |
| * | |
| * Install: | |
| * npm i puppeteer chalk cli-table |