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
curl "https://is.gd/create.php?format=simple&url=$(aws s3 presign \ | |
s3://<BUCKET_NAME>/<OBJECT_KEY> \ | |
--region ap-northeast-1 \ | |
--expires-in 60 | \ | |
jq -Rr @uri \ | |
)" |
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 boto3 | |
client = boto3.client('cognito-idp', region_name='ap-northeast-1') | |
userpool_id = 'ap-northeast-1_aaaaaaaa' | |
users = [] | |
response = client.list_users( |
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
こんにちは |
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
町なし | 町あり | |
---|---|---|
埼玉県川口市前川四丁目 | 埼玉県川口市前川町四丁目 | |
埼玉県川口市前川三丁目 | 埼玉県川口市前川町三丁目 | |
埼玉県深谷市深谷 | 埼玉県深谷市深谷町 | |
埼玉県深谷市国済寺 | 埼玉県深谷市国済寺町 | |
千葉県千葉市中央区蘇我二丁目 | 千葉県千葉市中央区蘇我町二丁目 | |
千葉県船橋市海神二丁目 | 千葉県船橋市海神町二丁目 | |
千葉県船橋市海神三丁目 | 千葉県船橋市海神町三丁目 | |
千葉県船橋市夏見二丁目 | 千葉県船橋市夏見町二丁目 | |
千葉県佐倉市飯野 | 千葉県佐倉市飯野町 |
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
{ | |
"basename": "tiles.mbtiles", | |
"id": "openmaptiles", | |
"filesize": "1847549952", | |
"attribution": "<a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">© OpenStreetMap</a>", | |
"bounds": [ | |
-180, | |
-85.0511, | |
180, | |
85.0511 |
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
// $ npm install turf tilebelt # dependencies | |
const turf = require("turf"); | |
const tilebelt = require('tilebelt'); | |
const calc = () => { | |
const lon = 10; | |
for (let z = 1; z < 31; z++) { | |
for (let lat = 0; lat < 90; lat += 10) { | |
const [x, y] = tilebelt.pointToTile(lon, lat, z); | |
const geometry = tilebelt.tileToGeoJSON([x, y, z]); |
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 aws_envify() { | |
export AWS_ACCESS_KEY_ID=$1 | |
export AWS_SECRET_ACCESS_KEY=$2 | |
if [ $3 != '' ]; then | |
export AWS_REGION=$3 | |
export AWS_DEFAULT_REGION=$3 | |
fi | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 aws_2fa() { | |
if [[ $AWS_SESSION_TOKEN != '' ]]; then | |
echo 'You seem to have a session token already.' | |
return | |
fi | |
export MFA_SERIAL=$(aws sts get-caller-identity | \ | |
npx jqf --raw-string-output 'x => `arn:aws:iam::${x.Account}:mfa/${x.Arn.match(/^arn:aws:iam::[0-9]+:user\/(?<username>.+)$/).groups.username}`') |
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
type Length<A extends any[]> = A extends { length: infer L } ? L : never; | |
type Prev<N extends number> = [never, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10][N]; | |
type Last<A extends any[]> = A[Prev<Length<A>>]; | |
type LastParam<F extends (...args: any[]) => any> = Last<Parameters<F>>; | |
type Callback<T> = (error: Error | null, data?: T | null) => void; | |
type CallbackData<F> = F extends Callback<infer T> ? T : never; | |
type BH = (...args: any[]) => any; | |
const promisify = <H extends BH>(handler: H) => { |
NewerOlder