Skip to content

Instantly share code, notes, and snippets.

View knoopx's full-sized avatar

Víctor Martínez knoopx

View GitHub Profile
@knoopx
knoopx / gist:99395843e8a321dc1990
Last active December 1, 2021 18:14
Picard.app renaming pattern
$rreplace($rreplace($rreplace($if2(%albumartist%,%artist%)-%album%$if(%catalognumber%,-\($upper($rreplace(%catalognumber%,[^A-Za-z0-9],))\))$if(%date%,-$left(%date%,4))/$lower($num(%tracknumber%,2)-%artist%-%title%),['\\.\,;:]+,),\\s+,_),Various_Artists,VA)
@knoopx
knoopx / grubShell
Last active August 23, 2021 12:01
Disable CFG-LOCK on Gigabyte GA-H270M-DS3H (rev. 1.0) F8d
setup_var 0x502 0x00
@knoopx
knoopx / readme.md
Last active August 19, 2021 04:53
Catalina + Windows 10 + Clover
  • make an extfat partition for windows using disk utility
  • make a bootable windows usb (just format disk as fat32 and rsync iso contents)
  • boot windows installation, press shift+f10 to open a console
  • type diskpart, then list volume to figure out windows extfat partion drive letter
  • type dism /Get-WimInfo /WimFile:D:\Sources\install.wim to figure out what window version to install
  • type dism /Apply-Image /ImageFile:D:\Sources\install.wim /index:1 /ApplyDir:C:\ to install specified version into C:
  • type diskpart, then list partition to figure out EFI partition.
  • type select partition #, then assign to "mount" EFI partition, annotate EFI partition letter.
  • type bcdboot C:\Windows /s E: /f uefi to copy Windows UEFI stuff to EFI partition (E:)
@knoopx
knoopx / README.md
Last active May 3, 2021 21:27
build opentx jumper t-lite
mkdir build
docker run -v "$PWD:/opentx" -w /opentx/build pafleraf/opentx-dev cmake -DPCB=X7 -DPCBREV=TLITE -DGVARS=YES -DLUA=YES -DHELI=NO -DDEBUG=NO -DCMAKE_BUILD_TYPE=Release ..
docker run -v "$PWD:/opentx" -w /opentx/build pafleraf/opentx-dev make -j4 firmware
@knoopx
knoopx / defaults
Last active November 21, 2020 09:25
defaults
defaults write -g InitialKeyRepeat -int 12
defaults write -g KeyRepeat -int 2
defaults write -g ApplePressAndHoldEnabled -bool false
defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false
defaults write com.apple.finder WarnOnEmptyTrash -bool false
defaults write -g WebAutomaticTextReplacementEnabled -bool true
chflags nohidden ~/Library
@knoopx
knoopx / Rakefile
Last active June 3, 2020 15:33
OpenTX Sound Generator
# Get a list by executing: say -v "?"
# Install more from Accessibility -> Speech
VOICE = "Samantha"
DEFAULT_MESSAGES = File.read("en-US-taranis.csv").lines.reduce({}) do |result, line|
path, filename, message = line.chomp.split(";")
result[File.join(path, File.basename(filename, ".*"))] = message
result
end
@knoopx
knoopx / MaterialSettingsVisibilityHandler.py
Last active November 17, 2019 14:43
Cura Extended Material Profiles
# Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import UM.Settings.Models.SettingVisibilityHandler
class MaterialSettingsVisibilityHandler(UM.Settings.Models.SettingVisibilityHandler.SettingVisibilityHandler):
def __init__(self, parent=None, *args, **kwargs):
super().__init__(parent=parent, *args, **kwargs)
# generates random dates per row
update myjacoti_measurementsession set date_start = (select random_date() where myjacoti_measurementsession.uuid = myjacoti_measurementsession.uuid);
@knoopx
knoopx / setup.sh
Last active December 23, 2018 17:57
raspberry tft
# https://tutorials-raspberrypi.de/lcd-touch-display-teil-2-anpassungen/
# http://projectable.me/raspberry-pi-touchscreen-octoprint-controller/
sudo apt-get install xserver-xorg-video-fbturbo
git clone https://github.com/goodtft/LCD-show.git
LCD-show/LCD35-show 180
# fix framebuffer
/etc/X11/Xwrapper.config -> allowed_users=anybody
/usr/share/X11/xorg.conf.d/99-fbdev.conf
Section "Device"
Identifier "touchscreen"
Driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection