Skip to content

Instantly share code, notes, and snippets.

View omasanori's full-sized avatar

Masanori Ogino omasanori

View GitHub Profile
shujisado /
Last active February 23, 2024 07:36
OSDNのミラーコンテンツ 2023/11/19

OSDNのミラーコンテンツ 2023/11/19

OSDNでのリリースファイルやソースコードは全世界の25〜30箇所程の公開ミラーサイトへミラーリングされていた。 現時点ではどれだけ生存しているかは調べていないが、まだそれなりに生きているかと思われる。ただ、日本だとJAIST(とIIJ(しかないようである。



martijnvermaat /
Last active February 22, 2024 22:13
Installation of NixOS with encrypted root
domenkozar / gist:c1da433406807255f9aa835d72976470
Created August 5, 2021 12:22
Thinkpad P14s NixOS installation
View gist:c1da433406807255f9aa835d72976470
wpa_supplicant -B -i interface -c <(wpa_passphrase 'SSID' 'key').
parted /dev/nvme0n1 -- mklabel gpt
parted /dev/nvme0n1 -- mkpart primary 512MiB -0
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 512MiB
parted /dev/nvme0n1 -- set 2 esp on
cryptsetup luksFormat /dev/nvme0n1p1
DraTeots / ComPort over
Last active February 20, 2024 10:48
ComPort over Network
View ComPort over
shafik /
Last active February 19, 2024 22:57
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

JamieMason /
Last active February 19, 2024 14:18
Unfollow everyone on

Unfollow everyone on

  1. Go to
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on, by Jamie Mason (
voluntas / webrtc.rst
Last active February 19, 2024 05:03
WebRTC コトハジメ
View webrtc.rst
osy /
Last active February 19, 2024 01:44
TPM provides zero practical security

TPM provides zero practical security

TPM (Trusted Platform Module) is as useful for preventing real attackers as the TSA is at preventing real terrorists. The architecture is fundamentally flawed and most existing implementations are completely broken. I thought this argument was settled decades ago[1] when "trusted computing" was introduced mostly as a way to provide DRM and ownership capabilities to organizations. It has largely failed to impact the consumer market when it was introduced back in the early 2000s. However, recently there seems to be a movement by certain parties to reintroduce this failed product back to the market. Microsoft argues that in order to use Windows 11, you need TPM 2.0 compatible hardware because[2]:

The Trusted Platform Module(TPM) requirement ena

jgamblin / commonssids.txt
Created November 28, 2016 02:00
5000 most of common SSID names from
View commonssids.txt
<no ssid>
MawKKe /
Last active February 13, 2024 16:46
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)