Skip to content

Instantly share code, notes, and snippets.


Masanori Ogino omasanori

  • Japan, or anywhere else
  • 07:32 (UTC +09:00)
View GitHub Profile
martijnvermaat /
Last active June 8, 2023 18:00
Installation of NixOS with encrypted root
DraTeots / ComPort over
Last active June 8, 2023 00:52
ComPort over Network
View ComPort over
shafik /
Last active June 6, 2023 21:09
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

MawKKe /
Last active May 31, 2023 22:28
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
# Author: Markus (MawKKe)
# Date: 2018-03-19
# What?
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
JamieMason / unfollow.js
Last active May 28, 2023 12:36
Unfollow everyone on
View unfollow.js
// Unfollow everyone on, by Jamie Mason (
// 1. Go to
// 2. Open the Developer Console. (COMMAND+ALT+I on Mac)
// 3. Paste this into the Developer Console and run it
// Last Updated: 09 April 2020
(() => {
const $followButtons = '[data-testid$="-unfollow"]';
pbrisbin /
Created October 27, 2014 18:55
ZSH startup file headaches

Default behavior dictates the following order for ZSH startup files:

  • /etc/zshenv
  • ~/.zshenv
  • /etc/zprofile (if login shell)
  • ~/.zprofile (if login shell)
  • /etc/zshrc (if interactive)
  • ~/.zshrc (if interactive)
  • /etc/zlogin (if login shell)
  • ~/.zlogin (if login shell)
voluntas / webrtc.rst
Last active May 25, 2023 16:31
WebRTC コトハジメ
View webrtc.rst
kayceesrk /
Last active March 28, 2023 06:19
OCaml native code notes

Concurrency primitives


(* raw continuation *)
type ('a,'b) stack
perform  : 'a eff -> 'a
resume   : ('a,'b) stack -> ('c -> 'a) -> 'c -> 'b
delegate : 'a eff -> ('a,'b) stack -> 'b
dherman / ssa-cps-anf.txt
Created November 20, 2012 03:10
links on SSA, CPS, and A-normal form
View ssa-cps-anf.txt
Original paper on A-normal form:
A high-level intro to ANF:
One of the earlier attempts to relate SSA and CPS:
jgamblin / commonssids.txt
Created November 28, 2016 02:00
5000 most of common SSID names from
View commonssids.txt
<no ssid>