Skip to content

Instantly share code, notes, and snippets.

View hakatashi's full-sized avatar
🈚
idgaf

Koki Takahashi hakatashi

🈚
idgaf
View GitHub Profile
@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"];
@frsyuki
frsyuki / my_thoughts_on_msgpack.md
Created June 11, 2012 02:36
My thoughts on MessagePack

My thoughts on MessagePack

Hi. My name is Sadayuki "Sada" Furuhashi. I am the author of the MessagePack serialization format as well as its implementation in C/C++/Ruby.

Recently, MessagePack made it to the front page of Hacker News with this blog entry by Olaf, the creator of the Facebook game ZeroPilot. In the comment thread, there were several criticisms for the blog post as well as MessagePack itself, and I thought this was a good opportunity for me to address the questions and share my thoughts.

My high-level response to the comments

To the best of my understanding, roughly speaking, the criticisms fell into the following two categories.

@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 になります。

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

@huonw
huonw / blackmagic.rs
Created January 15, 2014 12:42
do-while loops in Rust
while {
let x = foo();
bar(x);
x != 0
} {}
@ksasao
ksasao / detect_marker.py
Last active December 10, 2023 02:38
ZOZOSUITのマーカーのIDを読み取るコードです。公開されている画像を元に独自に解析しているので、公式ではこのように処理しているかどうかは不明です。仕様等については https://twitter.com/ksasao/status/990779583682170881 のスレッドも参照してください。全身を読み取るコード https://twitter.com/ksasao/status/989842844243279872 ライセンスは Apache License 2.0 です。
import numpy as np
import random
import math
import cv2
from PIL import Image
import sys
def detect_markers(im):
markers = []
# 輪郭線抽出のための二値化
@h2non
h2non / libvips-installer.sh
Last active October 3, 2023 20:07
libvips 7.42.x cross-platform simple installer script (supports OSX, Debian, Ubuntu, CentOS, Fedora, Amazon Linux)
#!/bin/sh
#
# Orinally made by Lovell Fuller for sharp
# https://github.com/lovell/sharp
#
# Usage:
# curl -s https://gist.githubusercontent.com/h2non/89bb2f87c6499d0b25f1/raw/bf3d0743107f02f5db2b93c53f7f0e07a1c33112/libvips-installer.sh | sudo bash -
#
@gakuzzzz
gakuzzzz / 1_.md
Last active August 2, 2023 01:59
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();
@stigok
stigok / githook.js
Last active July 30, 2023 09:46
Verify GitHub webhook signature header in Node.js
/*
* Verify GitHub webhook signature header in Node.js
* Written by stigok and others (see gist link for contributor comments)
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428
* Licensed CC0 1.0 Universal
*/
const crypto = require('crypto')
const express = require('express')
const bodyParser = require('body-parser')
@miyuki
miyuki / gcc-1.27.patch
Created October 4, 2017 21:11
A patch required to build GCC 1.27 on a modern system
diff --git a/Makefile b/Makefile
index ee02e0f..25a4aa5 100644
--- a/Makefile
+++ b/Makefile
@@ -373,19 +373,19 @@ maketest:
stage1: force
-mkdir stage1
mv $(STAGESTUFF) $(STAGE_GCC) stage1
- -rm stage1/gnulib
+ -rm -f stage1/gnulib
@ntddk
ntddk / fx0.md
Last active June 20, 2023 06:17
国内版Fx0にAndroidをインストールする

必要なもの

  • Windowsがインストールされたマシン(Windows 10で動作確認済)

手順

  • Android SDKをインストールする
  • KingoRootをインストールする
  • Fx0をUSBケーブルでマシンにつなぐ
  • KingoRootを起動し,「ROOT」をクリック
  • 待つ
  • adb shellからsuする