Skip to content

Instantly share code, notes, and snippets.

View parrotmac's full-sized avatar
🔨
Making things!

Isaac Parker parrotmac

🔨
Making things!
View GitHub Profile
@gdamjan
gdamjan / README.md
Last active February 7, 2024 21:11
run a minimal alpine based initramfs in VM machine

in 5 easy steps

1

get cloud-hypervisor or firecracker

2

compile a kernel (use the provided x_kernel_config file), you'll need the stripped ELF file in arch/x86/boot/compressed/vmlinux.bin or the compressed bzImage for cloud-hypervisor.

@smoser
smoser / README.md
Last active July 4, 2024 15:28
qemu to linux mapping of smbios / dmi information

Mappings for DMI/SMBIOS to Linux and dmidecode

Information can be put into dmi tables via some qemu-system hosts (x86_64 and aarch64). That information is exposed in Linux under /sys/class/dmi/id and can be read with dmidecode. The names are very annoyingly inconsistent. The point of this doc is to map them.

Mappings

Example qemu cmdline:

qemu-system-x86_64 -smbios type=<type>,field=value[,...]

qemu-system-x86_64 -smbios type=0,vendor=superco,version=1.2.3
@sbz
sbz / tty-size.c
Created April 14, 2017 02:05
get terminal size using ioctl get win size (TIOCGWINSZ) in C
#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>
int
main(void) {
struct winsize ws;
ioctl(STDIN_FILENO, TIOCGWINSZ, &ws);
printf ("lines %d\n", ws.ws_row);
@JamieMason
JamieMason / .babelrc
Created December 5, 2016 08:41
Tree-Shaking with Babel 6, Webpack 2, and React.
{
"presets": [
["es2015", {
"es2015": {
"loose": true,
"modules": false
}
}], "react"
]
}
@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active July 15, 2024 09:31
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@JamesHagerman
JamesHagerman / honda-fit-sport-2013-obd2-notes.md
Last active March 8, 2021 03:54
Sniffing OBDII on 2013 Honda Fit Sport

Honda OBDlink SX notes 2015-08-19

My OBDLink SX data:

>AT I
ELM327 v1.3a
>ST DI (HARDWARE ID STRING)
OBDLink SX r4.2
&gt;ST I (FIRMARE ID STRING)
# taken from http://www.piware.de/2011/01/creating-an-https-server-in-python/
# generate server.xml with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python simple-https-server.py
# then in your browser, visit:
# https://localhost:4443
import BaseHTTPServer, SimpleHTTPServer
import ssl
@marshall007
marshall007 / timeAgo.coffee
Last active December 20, 2015 00:09
AngularJS "Time Ago" filter.
timeAgo = angular.module 'app'
# Filter: time
# Date.parse() is inconsistent across browsers
# this is a shim for parsing ISO-8601 date strings
timeAgo.filter 'time', ->
(time) ->
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<features.h>
#include<linux/if_packet.h>
#include<linux/if_ether.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<net/if.h>
#include<net/ethernet.h>
@jhollinger
jhollinger / README.md
Last active July 12, 2024 02:41
rbackup - time-stamped, hard-linked backups powered by rsync

rbackup

rbackup is a lightweight, rsync-powered backup utility that creates time-stamped backups.

Features

It can save backups to your local filesystem (probably an attached USB device) or to a remote host.

Backups are saved in time-stamped directories. Backups are cheap on storage, because hard-links are used for files that haven't changed between backups.