Skip to content

Instantly share code, notes, and snippets.

View sixtyfive's full-sized avatar
🐯
Rawrrr.

J. R. Schmid sixtyfive

🐯
Rawrrr.
View GitHub Profile
# ~/.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 / 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'
@sixtyfive
sixtyfive / chars.rb
Last active September 15, 2021 13:31
Interpret bin/oct/dec/hex number(s) in specified character encoding and try to convert to UTF-8, then display the result if possible.
#!/usr/bin/env ruby
# -----------------------------------------------------------------------------
# chars: interpret bin/oct/dec/hex number(s) in specified character encoding
# and try to convert to UTF-8, then display the result if possible.
# (C) 2021 J. R. Schmid <jrs@weitnahbei.de>
# May be shared and used according to CC BY-SA 4.0
# (https://creativecommons.org/licenses/by-sa/4.0/)
# -----------------------------------------------------------------------------
@sixtyfive
sixtyfive / gist-scad.sh
Last active August 11, 2021 21:02
Takes the path to an OpenSCAD .scad file as input and copies a GitHub Gist URL onto your Xorg clipboard as output. The Gist will contain the OpenSCAD source file as well as an in-browser rendering of the (ASCII) STL file. Works for me, but open to PRs, er, comments. Please share alike as you see fit.
#!/bin/bash
# Prerequisites: ###
# - OpenSCAD #
# - GitHUB CLI #
# - xclip #
# ################ #
[[ -z $1 || "${1: -5}" != ".scad" ]] && (echo "Usage: gist-scad <path to OpenSCAD .scad file>"; kill $$; exit 1)
@sixtyfive
sixtyfive / pyvipstest.py
Last active April 29, 2021 11:17
don't cache 1000 operations => don't leak RAM ... also cf. https://github.com/libvips/pyvips/issues/88
#!/usr/bin/env python3
import os.path
import pyvips
infilepath = '/path/to/file.pdf'
basename = os.path.basename(infilepath).split('.')[0]
infile = open(infilepath, 'rb').read()
pyvips.voperation.cache_set_max(10) # 0 = no parallelisation at all
@sixtyfive
sixtyfive / end-gcode
Created September 4, 2020 09:44
Ender 2 Start- and End-G-code for Cura
G91 ;Relative positioning
G1 E-60 ;Remove filament from hotend completely
G1 Z5 ;Hover over the print
G90 ;Absolute positioning
G1 X0 Y140 ;Present print
M106 S0 ;Turn off fan
M104 S0 ;Turn off hotend
M140 S0 ;Turn off bed