Skip to content

Instantly share code, notes, and snippets.

View kyontan's full-sized avatar
♨️

kyontan kyontan

♨️
View GitHub Profile
@voluntas
voluntas / death_march.md
Last active December 29, 2023 15:36
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

@yosida95
yosida95 / pre-commit
Created April 13, 2018 09:46
Check Java format against google-java-format and prevent git commit if found violations
#!/usr/bin/env bash
google_java_format=$HOME/.local/lib/google-java-format-1.5-all-deps.jar
[ -f "$google_java_format" ] || exit 1
git diff --name-only --cached| {
code=0
while IFS= read -r file; do
[ -f "$file" ] || continue
case "$file" in
@mgalardini
mgalardini / run_notebook.py
Created June 14, 2017 10:00
Pass arguments to a Jupyter notebook and save it after re-running it
#!/usr/bin/env python
'''
Run and save a jupyter notebook by providing arguments from the command line
Uses the nbparameterise package, and requires the first cell to have variables
definitions.
Command line parsing based on this Stack Overflow answer:
https://stackoverflow.com/a/42355279/1237531
'''
@hediet
hediet / main.md
Last active March 11, 2024 15:05
Proof that TypeScript's Type System is Turing Complete
type StringBool = "true"|"false";


interface AnyNumber { prev?: any, isZero: StringBool };
interface PositiveNumber { prev: any, isZero: "false" };

type IsZero<TNumber extends AnyNumber> = TNumber["isZero"];
type Next<TNumber extends AnyNumber> = { prev: TNumber, isZero: "false" };
type Prev<TNumber extends PositiveNumber> = TNumber["prev"];
[Unit]
Description=Keep reverse portforward tunnel
After=network.target
[Service]
User=root
Restart=always
RestartSec=5
Type=simple
ExecStart=/usr/bin/ssh -NTv \
@lambdamusic
lambdamusic / keynote.scpt
Last active April 23, 2024 18:33
Apple Keynote: export presenter notes
-- HOWTO:
-- after saving it, open with Script Editor (default) and run it
-- PREREQUISITES:
-- make sure your Keynote presentation is open in the background
-- AFTER EXPORT:
-- if you can't open the file due to encoding errors, open with Sublime (or another a text editor) and then "File / Save with encoding / UTF8"
tell application "Keynote"
@yutopp
yutopp / 温泉.md
Last active February 10, 2020 03:28

適当に感想を書くので、ググって行ってどうぞ。 多分全部日帰りで使えるところです。

北海道

名前 感想 行った回数 行った時期 オススメ感
第一滝本館 登別の地獄谷が窓から全部見られる。温泉の種類も多く、露天風呂からは季節によっては紅葉とかも見られそうだった。少し割高なものの、1日中居られそうな気がするくらい充実していると思う。 1 晩夏/昼 95点

会津(若松のほう)

|名前|感想|行った回数|行った時期|オススメ感|

@ddgenome
ddgenome / aws-creds.bash
Last active February 5, 2024 19:32
Fetch AWS STS keys and set environment variables
#!/bin/bash
# Fetch 24-hour AWS STS session token and set appropriate environment variables.
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html .
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ .
# Add this function to your .bashrc or save it to a file and source that file from .bashrc .
# https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c
#
# usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...]
function aws-creds () {
local pkg=aws-creds
@necojackarc
necojackarc / active_job_retry_controlable.rb
Last active June 30, 2021 13:20
To enable ActiveJob to control retry
module ActiveJobRetryControlable
extend ActiveSupport::Concern
DEFAULT_RETRY_LIMIT = 5
attr_reader :attempt_number
module ClassMethods
def retry_limit(retry_limit)
@retry_limit = retry_limit
# start GremlinServer
# bin/gremlin-server.sh -i org.apache.tinkerpop gremlin-python 3.2.2-SNAPSHOT
# bin/gremlin-server.sh conf/gremlin-server-modern-py.yaml
from gremlin_python.process.graph_traversal import GraphTraversal
from gremlin_python.process.graph_traversal import GraphTraversalSource
from gremlin_python.process.graph_traversal import __
from gremlin_python.process.traversal import Operator
from gremlin_python.structure.io.graphson import GraphSONReader