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 / 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 / wireguard.sh
Last active January 15, 2023 19:45
wireguard alpine raspberry pi
sudo apk add wireguard-tools wireguard-rpi libqrencode
echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
echo "net.ipv4.conf.all.proxy_arp" >> /etc/sysctl.conf
sed -i 's/IPFORWARD="no"/IPFORWARD="yes"/g' /etc/conf.d/iptables
cd /etc/wireguard
umask 077
wg genkey | tee peer1_privatekey | wg pubkey > peer1_publickey
wg genkey | tee server_privatekey | wg pubkey > server_publickey
@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 / 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:)
# generates random dates per row
update myjacoti_measurementsession set date_start = (select random_date() where myjacoti_measurementsession.uuid = myjacoti_measurementsession.uuid);
@knoopx
knoopx / class-methods-to-arrow-function-props.js
Last active February 9, 2022 12:01
codemod - rewrite class methods as arrow function properties
const IGNORE = [
'constructor',
'componentDidMount',
'componentDidUpdate',
'componentWillReceiveProps',
'componentWillMount',
'componentWillUpdate',
'componentWillUnmount',
'getChildContext',
'getDefaultProps',
@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)
@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