Skip to content

Instantly share code, notes, and snippets.

View MitchRatquest's full-sized avatar

Mitchell Dokken MitchRatquest

View GitHub Profile
#!/usr/bin/env python3
'''
calisuck: index, filter-out smartly and download ebooks from Calibre open directories
Installation:
You need python 3.5 installed
Download the file as a zip and unzip-it and get into the dir
@fumiyas
fumiyas / openssh-build-static.sh
Created October 4, 2017 09:20
Build OpenSSH with static linked zlib and OpenSSL libraries
#!/bin/sh
set -u
set -e
umask 0077
prefix="/opt/openssh"
top="$(pwd)"
root="$top/root"
build="$top/build"
@bellbind
bellbind / less.py
Created July 6, 2012 07:09
[python]less command with curses
# example of curses: less command
import locale
import sys
import curses
def load():
filename = sys.argv[1]
with open(filename) as f:
return f.readlines(), filename
return [], ""
@stecman
stecman / STM8S_programming_examples.md
Last active January 7, 2024 01:44
STM8S code examples

This is a collection of code snippets for various features on the STM8S family microcontrollers (specifically the STM8S003F3). These are written against the STM8S/A SPL headers and compiled using SDCC.

Some of this controller's functions aren't particularly intuitive to program, so I'm dumping samples for future reference here. These are based on the STM8S documentation:

Run at 16MHz

@takaswie
takaswie / pcm-rw-interleaved.c
Last active December 3, 2023 15:49
ALSA PCM application to utilize intermediate buffer inner kernel space
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@gdamjan
gdamjan / 0-README.md
Last active November 17, 2023 22:07
hacking the kindle paperwhite

TODO - hack the kindle paperwhite

focus on the gen 2 / DP75SDI

compile kernel + initramfs with openwrt:

  • because it cross-compiles easily
  • has a reasonably simple user-space
  • device-tree?

CONFIG_PACKAGE_kmod-usb-gadget-serial

@webdev23
webdev23 / QEMU_MicroXP-v0.82.php
Last active May 3, 2023 18:27
QEMU MicroXP-v0.82.iso installation script from internet archives
#!/usr/bin/php
<?php
echo " _.-;;-._
\e[15;48;5;20mMicro_xp QEMU deployment script '-..-'| || |
'-..-'|_.-;;-._|
'-..-'| || |
'-..-'|_.-''-._|
";
@Gadgetoid
Gadgetoid / README.md
Last active February 20, 2023 09:35
Raspberry Pi Zero / Windows 10 automatic RNDIS driver install for composite gadgets

Preface

I owe my very rapid learning journey in the world of ConfigFs to several key sources which aren't necessarily relevant to this result, but I feel deserve a mention anyway.

@joeycastillo
joeycastillo / code.py
Created January 24, 2020 21:10
Capacitive Touch Matrix Test
"""
Test script for CAPT-B1-02 Capacitive Touch Matrix FeatherWing
Board files: https://github.com/joeycastillo/Feather-Projects/tree/master/Experiments/Cap%20Touch%20Experiments
Also uses an Adafruit 16x8 LED matrix:
https://www.adafruit.com/product/2037
"""
import board
import touchio
@Avyd
Avyd / Compile to .deb
Last active September 23, 2021 09:33
Compile kernel to installable .deb package
#Install necessary things
apt-get update
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2 build-essential -y
#Get the kernel
cd /usr/src
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.xz
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.13.tar.sign
gpg --verify linux-3.13.tar.sign
tar xpvf linux-3.13.tar.xz