Skip to content

Instantly share code, notes, and snippets.

View klange's full-sized avatar
🤔
Contemplative.

K Lange klange

🤔
Contemplative.
View GitHub Profile
../../3rdparty/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp: In member function ‘void blink::FrameLoader::didInstallNewDocument(bool)’:
../../3rdparty/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp:517:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (contentSecurityPolicy);
^~
../../3rdparty/chromium/third_party/WebKit/Source/core/loader/FrameLoader.cpp:518:5: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
m_frame->document()->initContentSecurityPolicy(contentSecurityPolicy);
klange@luka master ~/P/w/toaru-nih$ util/auto-dep.py --make apps/panel.c [04/17 22:43:21]
base/bin/panel: apps/panel.c base/usr/include/toaru/yutani.h base/usr/include/toaru/drawstring.h base/usr/include/toaru/hashmap.h base/usr/include/toaru/graphics.h base/usr/include/toaru/pex.h base/usr/include/toaru/list.h base/usr/include/toaru/kbd.h base/usr/include/toaru/pthread.h | base/lib/libtoaru_yutani.so base/lib/libtoaru_drawstring.so base/lib/libtoaru_hashmap.so base/lib/libtoaru_graphics.so base/lib/libtoaru_pex.so base/lib/libtoaru_list.so base/lib/libtoaru_kbd.so base/lib/libtoaru_pthread.so $(LC)
$(CC) $(CFLAGS) -o $@ $< -ltoaru_yutani -ltoaru_drawstring -ltoaru_hashmap -ltoaru_graphics -ltoaru_pex -ltoaru_list -ltoaru_kbd -ltoaru_pthread
klange@luka master ~/P/w/toaru-nih$ touch apps/panel.c
@klange
klange / readme.md
Last active April 18, 2018 20:08
From Boot to HTTP: A Line-by-Line Analysis (ToaruOS-NIH)

Note: This article is a work-in-progress.

From Boot to HTTP: A Line-by-Line Analysis

A few years ago I did a talk about ToaruOS in which I traced through the system and explained how typing in a terminal worked at each layer. ToaruOS has changed a lot since then, and the slides from that talk have become outdated. Additionally, the level of detail to which a 40-minute talk can delve is limited, but an article can go much deeper. With the recent development of ToaruOS-NIH, a completely in-house distribution of ToaruOS with all code under the NCSA license, I figured it was time to approach that challenge again.

Background

This article is a followup to my talk at Yelp, which itself was inspired by an article that posed the following question:

class Foo(object):
a = 1
f = Foo()
f.a = 3
g = Foo()
print g.a, f.a, Foo.a # 1 3 1
Foo.a = 4
h = Foo()
print g.a, f.a, h.a, Foo.a # 4 3 4 4
@klange
klange / output
Created January 12, 2018 05:54
wine detect
$ wine ./winedetect.exe
Running Wine 1.8.7 under Linux 4.9.0-4-amd64.
@klange
klange / readme.md
Created December 13, 2017 07:35
Vocaloid Keyboard Parts
# encoding: utf-8
from bdflib import reader
import sys
reload(sys)
sys.setdefaultencoding('utf8')
with open('knxt.bdf','r') as f:
font = reader.read_bdf(f)
@klange
klange / nc.py
Last active August 17, 2017 14:40
import sys
import os
import termios
import tty
from fswait import fswait
telnet_mode = False
i = 1
-------------------------------------------------------------------------------
Found the following certs:
Certificate Name: packages.toaruos.org
Domains: packages.toaruos.org
Expiry Date: 2017-11-13 07:54:00+00:00 (VALID: 89 days)
Certificate Path: /etc/letsencrypt/live/packages.toaruos.org/fullchain.pem
Private Key Path: /etc/letsencrypt/live/packages.toaruos.org/privkey.pem
Certificate Name: www.toaruos.org
Domains: toaruos.org,www.toaruos.org
Expiry Date: 2017-11-13 00:24:00+00:00 (VALID: 89 days)
set -v
qemu-system-x86_64 -cdrom toaruos.iso -m 1G -M accel=kvm:tcg -soundhw ac97 -vnc :0 &
QEMU_PID=$!
sleep 3
xvncviewer -Shared :0 &
VNC_PID=$!