Skip to content

Instantly share code, notes, and snippets.

@goose121
goose121 / dsdt.dsl
Created December 9, 2017 19:16
Zenbook UX430UQ DSDT
This file has been truncated, but you can view the full file.
/*
* Intel ACPI Component Architecture
* AML/ASL+ Disassembler version 20170929 (64-bit version)
* Copyright (c) 2000 - 2017 Intel Corporation
*
* Disassembling to symbolic ASL+ operators
*
* Disassembly of dsdt.dat, Wed Nov 8 13:54:00 2017
*
* Original Table Header:
@goose121
goose121 / hyptab.diff
Created December 10, 2017 01:40
A patch to caps2esc for swaywm users to use tab as Mod3
--- caps2esc.c 2017-12-09 18:37:33.550024972 -0700
+++ /home/kah/code/caps2esc/caps2esc.c 2017-12-09 18:28:27.240021549 -0700
@@ -1,21 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
#include <linux/input.h>
// clang-format off
[ 0.000000] Linux version 4.14.9-1-ARTIX (builduser@artix-server) (gcc version 7.2.1 20171128 (GCC)) #1 SMP PREEMPT Tue Dec 26 10:00:19 UTC 2017
[ 0.000000] Command line: \vmlinuz-linux root=/dev/sda2 rw add_efi_memmap initrd=\initramfs-linux.img
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64
@goose121
goose121 / etc_conf.d_ssh-chat
Created January 3, 2018 02:52
An OpenRC service for ssh-chat
# Config for /etc/init.d/ssh-chat
# See `/usr/bin/ssh-chat --help` for more details
# The admin's key fingerprint
#admin_fingerprint=SHA256:[INSERT HERE]
# The server's private key
server_ident=[INSERT HERE]
# The port to bind to
@goose121
goose121 / main.c
Created January 3, 2018 18:05
FizzBuzz
#include <iostream>
int main(){
for(int i = 1; i <= 100000; i++)
std::cout << "\e[s" << i << "\e[u" << ((i % 3)?"":"fizz\e[K") << ((i % 5)?"":"buzz\e[K") << std::endl;
}
@goose121
goose121 / main.c
Created January 3, 2018 18:31
FizzBuzz (function pointers)
#include <stdio.h>
void fizz(int i) {
printf("fizz\n");
}
void buzz(int i) {
printf("buzz\n");
}
@goose121
goose121 / dmesg.txt
Created January 15, 2018 20:48
Nouveau dmesg
[ 0.000000] Linux version 4.14.13-1-ARTIX (builduser@artix-server) (gcc version 7.2.1 20171224 (GCC)) #1 SMP PREEMPT Thu Jan 11 01:03:32 UTC 2018
[ 0.000000] Command line: \vmlinuz-linux root=/dev/sda2 rw add_efi_memmap rcutree.rcu_idle_gp_delay=1 initrd=\initramfs-linux.img
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[3]: 832, xstate_sizes[3]: 64
[ 0.000000] x86/fpu: xstate_offset[4]: 896, xstate_sizes[4]: 64
@goose121
goose121 / server.rs
Created April 3, 2018 21:37
Avahi bindings with invalid variable names
// This code was autogenerated with dbus-codegen-rust, see https://github.com/diwic/dbus-rs
#![allow(dead_code)]
use dbus as dbus;
use dbus::arg;
use dbus::tree;
pub trait OrgFreedesktopDBusIntrospectable {
type Err;
fn introspect(&self) -> Result<String, Self::Err>;
@goose121
goose121 / main.rs
Created April 21, 2018 01:12
simd-squares-of-squares
#![feature(stdsimd)]
use std::simd::FromBits;
use std::simd::{i32x8, f32x8};
use std::arch::x86_64::{__m256, _mm256_sqrt_ps, _mm256_floor_ps};
use std::io::{stdout, Write};
use std::thread;
const NUM_THREADS: i32 = 4;
@goose121
goose121 / config.rkt
Created January 20, 2019 01:05
i3 configuration using Scribble
#lang scribble/text
@(require racket threading "i3cfg.rkt")
@; i3 config file (v4)
@;
@; Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4