Skip to content

Instantly share code, notes, and snippets.

View sixtyfive's full-sized avatar
🐯
Rawrrr.

J. R. Schmid sixtyfive

🐯
Rawrrr.
View GitHub Profile
@sixtyfive
sixtyfive / apk-installed-sizes.sh
Last active March 21, 2024 03:47
List installed Alpine Linux packages together with their installed sizes in human-friendly format
#!/bin/bash
# there's a tool called numfmt which does the bytes thing for you
# numfmt can also absorb stdin, so the entire thing could just be
# `apk info |
# numfmt --to=iec | # (might need --invalid=ignore and --field=...)
# awk -v OFS="\t" '... {print size, pkg}'
# or you can use awk to do the bytes stuff and use `apk info | awk ...'
bytesToHuman() {
b=${1:-0}; d=''; s=0; S=(Bytes {K,M,G,T,P,E,Z,Y}iB)
# ~/.ruby-lsp-gemset/.tool-versions
ruby 3.3.0
@sixtyfive
sixtyfive / yolo-updates.html
Last active July 31, 2023 11:57
List of updates to Yolo FC campaign on GoFundMe (not directly linkable from there)
<!-- View rendered HTML: https://gistpreview.github.io/?24bf4d6e32b4879562eecf467890d3f1/yolo-updates.html -->
<!DOCTYPE html>
<html>
<body>
<div class="o-expansion-list-wrapper"><ul class="o-updates-modal-list hrt-list-unstyled"><li class="o-updates-modal-item"><div class="o-updates-modal-list-item m-update"><header class="m-update-info"><span class="heading-5 hrt-font-bold hrt-mr-1">19 July 2023</span><span class="hrt-text-gray hrt-text-body-sm"> by Christoph Redecker<span>,&nbsp;<span class="m-update-info-name">Organiser</span></span></span></header><div class="m-update-content"><span class="">We have sent out another H7 dev board - this time to Dominic Clifton (aka Hydra/SPRacing)- and finally got the betaflight H725/H735 target to show up in the configurator, which is a major step towards flying the Yolo H7 and also the HypaWhoop. The ICM-20602 and Barometer seem to be working on the dev board, and we'll post further updates about the progress.<br>
<br>
The Yolo H7 will be test flown first after we've
@sixtyfive
sixtyfive / README.md
Last active February 16, 2023 17:13
Some mods for the Pinebook Pro

What?

  • Changes the Power key to be Delete
  • Increases the display LED backlight PWM frequency to 10kHz
  • Overclocks the CPUs by 15-20%

How?

Please note that I'm running Manjaro. If you're going to be doing this under Debian, your paths will not have the /dtbs part in them as I'm told. You'll have to change things accordingly!

@sixtyfive
sixtyfive / .Xresources
Last active January 29, 2023 22:37
Sensible, readable, good rxvt-unicode configuration.
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
URxvt.depth: 32
URxvt.loginShell: true
URxvt.geometry: 125x40
URxvt.iconFile: /usr/share/icons/Adwaita/256x256/apps/utilities-terminal.png
URxvt.allow_bold: false
@sixtyfive
sixtyfive / update-ddns.rb
Last active December 10, 2022 22:48
DIY dDNS service script using Hetzner's DNS API
#!/usr/bin/env ruby
# on OpenRC systems, place into e.g. /etc/periodic/15min
# (or create /etc/periodic/1min and add line to root's crontab)
# on systemd systems, install it as a timer
# must be registered at https://robot.hetzner.com/domain
ZONE="domain-of-your-choice.tld"
RECORD="subdomain-of-your-choice"
# create/find these in Hetzner's DNS admin interface at https://dns.hetzner.com/
require 'json'
file = File.read('./event.json')
event = JSON.parse(file)
keys = event['windows']['perfmon']['metrics']
hash=keys.map { |key, value|
key.split('_').reverse.reduce(value) {
|key_value, next_key| {
next_key => key_value
}
source 'https://rubygems.org'
gem 'docx'
def colprint(aofas)
s=""; aofas.each{|i,c| s<<i; s<<(' '*(c-i.size+1)) if c>=i.size}; s
end
@sixtyfive
sixtyfive / nginx-md.php
Created November 23, 2016 20:15
How to serve static Markdown directly through Nginx using php-fpm
<?php
error_reporting(0);
# Install from https://github.com/michelf/php-markdown
require_once 'php-markdown/vendor/autoload.php';
use \Michelf\Markdown;
$text = file_get_contents($_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME']);
$html = Markdown::defaultTransform($text);
?>