Requirements
- Node v22.4.1 or later
Setup
| import pyproj | |
| proj = pyproj.Transformer.from_crs("EPSG:3857", "EPSG:32604", always_xy=True) | |
| geod = pyproj.CRS.from_string("EPSG:32604").get_geod() | |
| print(geod) | |
| print(geod.line_length( | |
| [-157.84374, -157.84374], | |
| [21.29000, 21.29001] | |
| )) |
| // pages/api/hello.js | |
| import CookieSession from 'cookie-session' | |
| const cookieSession = CookieSession({ name: 'session', keys: ['foo', 'bar'] }) | |
| function runMiddleware(req, res, fn) { | |
| return new Promise((resolve, reject) => { | |
| fn(req, res, result => { | |
| if (result instanceof Error) { | |
| return reject(result) |
| // Converted https://gist.github.com/shrugs/44cfb94faa7f09bcd9cb for ES6 | |
| function scriptRunPromise() { | |
| const gs = {}; | |
| // google.script.run contains doSomething() methods at runtime. | |
| // Object.keys(goog.sscript.run) returns array of method names. | |
| const keys = Object.keys(google.script.run); | |
| // for each key, i.e. method name... |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Image Uploader</title> | |
| </head> |
| # coding: utf8 | |
| from flask import Flask | |
| app = Flask(__name__) | |
| @app.route('/') | |
| def hello(): | |
| return 'Hello World!' |
| #!/bin/bash | |
| # activate | |
| cat << 'EOS' > activate | |
| export GOPATH=$(pwd) | |
| export PATH=${PATH}:$(pwd)/bin | |
| EOS | |
| # VS Code setting | |
| mkdir -p .vscode |
| // 既定値を上書きするには、このファイル内にキー バインドを挿入します | |
| [ | |
| // Moving cursor | |
| { "key": "ctrl+p", "command": "cursorUp", | |
| "when": "editorTextFocus" }, | |
| { "key": "ctrl+n", "command": "cursorDown", | |
| "when": "editorTextFocus" }, | |
| { "key": "ctrl+f", "command": "cursorRight", | |
| "when": "editorTextFocus"}, | |
| { "key": "ctrl+b", "command": "cursorLeft", |
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| ) | |
| func main() { | |
| var p Point = Point{2, 3} | |
| var q Quality = Quality{99.9} |
| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| in1 := make(chan int) | |
| in2 := make(chan string) | |
| done := make(chan bool) |