Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rhysd's full-sized avatar
🐕
Fixing an off-by-wan error

Linda_pp rhysd

🐕
Fixing an off-by-wan error
View GitHub Profile
@pervognsen
pervognsen / shift_dfa.md
Last active January 27, 2024 19:54
Shift-based DFAs

A traditional table-based DFA implementation looks like this:

uint8_t table[NUM_STATES][256]

uint8_t run(const uint8_t *start, const uint8_t *end, uint8_t state) {
    for (const uint8_t *s = start; s != end; s++)
        state = table[state][*s];
    return state;
}
@mewmew
mewmew / ll.bnf
Last active January 16, 2024 15:38
A BNF grammar for LLVM IR assembly
// ### [ Lexical part ] ########################################################
_ascii_letter_upper
: 'A' - 'Z'
;
_ascii_letter_lower
: 'a' - 'z'
;
#CXRLE Pos=-7289,-1110
x = 10016, y = 6796, rule = B3/S23
5843b2o$5843b2o4$5861bobo$5856bo4bo2bo$5857b2o5b2o8bo$5852b2o8bo3b2o5b
obo$5852b2o10b2o6bob2o$5841b2obob2o13bo2bo6b2ob2o$5861bobo8bob2o$5841b
o5bo25bobo8b2o$5864bo9bo9bobo$5842b2ob2o16bo22bo$5844bo18b3o20b2o6$
5847bo17b2o$5841b3o4b2o15b2o$5840bo3bo2b2o2$5839bo5bo$5839b2o3b2o2$
5864b2o$5864bobo$5866bo$5866b2o$5839b2o$5840bo$5837b3o$5837bo7$5851bo$
5851b3o$5854bo14bobo$5853b2o6b2o7b2o5b2o$5860bobo7bo6bo$5861bo16b3o$
5880bo2$5848b2o$5848b2o6b2o29b2o$5856b2o28bo2bo$5887b2o$5865b2o20b2o$
5865b2o19b2o8b2o$5885b2obo6bobo$5850b2o33b2obo7bo$5849bobo35bo$5849bo
@haya14busa
haya14busa / .git_commit_msg.txt
Created March 1, 2017 15:56
Commit emoji convention
## Commit emoji convention
#
# | emoji | description |
# |--------------------|-----------------------------------------|
# | :memo: | Add comment or doc |
# | :gift: | New feature. |
# | :bug: | Bug fix |
# | :bomb: | Breaking compatibility. |
@yutopp
yutopp / 温泉.md
Last active February 10, 2020 03:28

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

北海道

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

会津(若松のほう)

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

@HaleTom
HaleTom / print256colours.sh
Last active April 14, 2024 13:35
Print a 256-colour test pattern in the terminal
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256
@rauchg
rauchg / README.md
Last active January 6, 2024 07:19
require-from-twitter

ロジバンで心ぴょんぴょんしたい

この記事はAizu Advent Calendar 2015の8日目の記事です。ロジバンでいかに心がぴょんぴょんすることを伝えるかについて考えていきます。

ロジバンとは?

ロジバンとは、人間同士のコミュニケーションのための人工言語です。

  • 自然言語ではなく述語論理を元に文法が作られている。
  • 構文に曖昧さが無い。
  • 話者の態度、感情を表す単語(心態詞)がある。
  • 音(音素)と文字が完全に対応している。
@paulirish
paulirish / what-forces-layout.md
Last active April 23, 2024 11:02
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent