Skip to content

Instantly share code, notes, and snippets.

View hikalium's full-sized avatar

hikalium hikalium

View GitHub Profile
$fs=$preview ? 1 : 0.1; // Don't generate smaller facets than 0.1 mm
$fa=$preview ? 15 : 5; // Don't generate larger angles than 5 degrees
screw_height = 20;
screw_radius = 10;
screw_pos_neg_offset = 1;
screw_pos_neg_ratio = (screw_pos_neg_offset + screw_radius) / screw_radius;
module bolt() {
linear_extrude(
height = screw_height,
twist = screw_height * 20,
use std::borrow::BorrowMut;
use std::convert::From;
use std::ops::Drop;
use std::pin::Pin;
#[derive(Debug)]
#[allow(dead_code)]
struct U8Wrapper(u8, ());
impl From<u8> for U8Wrapper {
fn from(value: u8) -> Self {

Quartus II をコマンドラインで使う方法

  • Quartus II Version 15.0.0 Build 145 04/22/2015 SJ Web Edition

  • with Cyclone IV C4E6 ボード

  • ちなみに私はこれを、QuartusIIインストールも含め一切GUIを起動することなく実行した。

  • ピン制約情報は.qsfに記述。.pinファイルは自動生成されるだけで参照されることはない。

  • .sof, .pofが, Xilinxでいうbitstreamに相当する最終生成ファイル。

#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <sys/mman.h>
void print_prot_bits(int prot) {
printf((prot & PROT_READ) == 0 ? "-" : "R");
printf((prot & PROT_WRITE) == 0 ? "-" : "W");
printf((prot & PROT_EXEC) == 0 ? "-" : "X");
}
SeaBIOS (version rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org)
iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+7FF8EE80+7FEEEE80 CA00
Booting from Hard Disk...
Redox Loader - Stage One
00000001#007F 0000:7E00

OS Girlsのサポートページ

このページは、技術書典6にて頒布した、OS Girlsを購入してくださった皆さま向けに情報を提供するページです。

pdf版の書籍は、BOOTHで販売しています。

かんたん後払いで購入いただいたみなさまは、技術書典のマイページからpdfをダウンロードできるはずです。詳細は、技術書典運営による案内ツイートを参考にしてください。

2019-11-19

「そういえば先輩、今まで教えていただいたプログラムなんですけど、家に帰ってからちょっと遊んでみたいなあって思ったんですが、データをいただけたりしますか?」

Keybase proof

I hereby claim:

  • I am hikalium on github.
  • I am hikalium (https://keybase.io/hikalium) on keybase.
  • I have a public key ASCf_RxDN_pFv5akQqZYNoTRu93wHW6xsd9KrEym-hjQJwo

To claim this, I am signing this object:

@hikalium
hikalium / print.js
Created December 22, 2019 14:04
Parser for SECCON 2019 final q4 box4
// box4
const fs = require('fs');
const filename = process.argv[2];
const parseTrace =
(fileName) => {
const trace = JSON.parse(fs.readFileSync(fileName, 'utf-8'));
const base_addr = parseInt(trace[0].base_addr, 16);
const branches = trace.filter(e => (e.inst_addr != undefined)).map(e => {
if (e.event === 'call') {
@hikalium
hikalium / reader.c
Created October 20, 2019 06:29
AVI file reader for SECCON 2019 Online CTF
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char buf[1024 * 1024 * 4];
typedef struct _avimainheader {
uint32_t fcc;
uint32_t cb;
@hikalium
hikalium / .config
Created May 20, 2019 22:54
.config for UEFI boot + SMP Support on qemu-system-x86_64
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.2.0-rc1 Kernel Configuration
#
#
# Compiler: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=50400