This file contains hidden or 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 -S deno run -A | |
import * as path from "https://deno.land/std@0.208.0/path/mod.ts"; | |
import * as posix from "https://deno.land/std@0.208.0/path/posix/mod.ts"; | |
import { walk } from "https://deno.land/std@0.208.0/fs/walk.ts"; | |
interface Note { | |
relPath: string; | |
absPath: string; | |
content: string; | |
} |
This file contains hidden or 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
/** | |
* Example: | |
* | |
* ```java | |
* withEarlyReturn(Result.class, (c) -> { | |
* var value = switch (someAction()) { | |
* case Success(var value) -> { | |
* return value; | |
* } | |
* case Failure(var error) -> { |
This file contains hidden or 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
init: | |
#!/usr/bin/env -S bash -euo pipefail -o noclobber | |
echo "[Generating Dockerfile...]" | |
cat - > Dockerfile <<'EOF' | |
FROM redmine:6.0.3 | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
build-essential=12.9 \ | |
pkg-config=1.8.1-1 \ | |
libxml2-dev=2.9.14+dfsg-1.3~deb12u1 \ | |
libxslt1-dev=1.1.35-1 \ |
This file contains hidden or 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
module TestUtil.PostgreSQL | |
( PostgreSQL (..) | |
, withPostgreSQL | |
, withSharedPostgreSQL | |
, runQueryBeforeAll | |
, runQueryBefore | |
, stopAllContainers | |
) where | |
import Control.Monad.Logger (MonadLoggerIO, runNoLoggingT, runStderrLoggingT) |
This file contains hidden or 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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+n", | |
"command": "workbench.action.files.save" | |
}, | |
{ | |
"key": "ctrl+s", | |
"command": "-workbench.action.files.save" | |
}, |
This file contains hidden or 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文の後に | |
-- @ | |
-- -- $setup | |
-- -- >>> import DoctestUtil | |
-- @ | |
-- と書いておくと便利 | |
module DoctestUtil | |
( pretty | |
, capture |
This file contains hidden or 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
-- [Control.Monad.IO.Unlift](https://hackage.haskell.org/package/unliftio-core-0.2.1.0/docs/Control-Monad-IO-Unlift.html#t:MonadUnliftIO) | |
-- 定義はできるがInverse lawが成り立たないのでダメ | |
-- withRunInIO (\_ -> throwIO e) === liftIO (throwIO e) | |
-- にならないといけないが、pure (Left e)になってしまう。 | |
-- たぶんjoinの保存則も成り立たないんじゃないかな。 | |
-- | |
-- あと、askUnliftIOを使うとtryのスコープを抜けてしまって酷いバグになりそう。 | |
-- askUnliftIO = withRunInIO (\run -> return (UnliftIO run)) | |
instance (MonadUnliftIO m, Exception e) => MonadUnliftIO (ExceptT e m) where | |
withRunInIO inner = |
This file contains hidden or 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
comm -23 \ | |
<(seq "1" "65535" | sort) \ | |
<(ss -tan | awk '{print $4}' | cut -d: -f2 | tail -n+2 | grep -v '^$' | sort | uniq -u) \ | |
| shuf -n 1 |
This file contains hidden or 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
module(load="imudp") | |
module(load="imtcp") | |
module(load="mmjsonparse") | |
# Listen on port 514 | |
input(type="imudp" port="514") | |
input(type="imtcp" port="514") | |
template(name="Identity" type="list") { |
This file contains hidden or 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
# GitHubのUIではrebaseすると未解決スレッドを参照するのがとても難しくなるので、コメントに一覧を表示しておく | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
pull_request_review_comment: | |
types: | |
# TODO コメント追加の度に走るのはまずいかな?2秒で終わっても課金上は1分で計算されるらしい |
NewerOlder