Skip to content

Instantly share code, notes, and snippets.

View EndruK's full-sized avatar

André Karge EndruK

View GitHub Profile
@EndruK
EndruK / c_cpp_properties.json
Created October 21, 2021 15:24
VS Code cpp properties for compiling Arduino scripts
{
"env": {
"arduino.path": "${HOME}/.arduino15/packages/arduino",
"arduino.avr.include.path": "${env:arduino.path}/hardware/avr/1.8.3",
"arduino.avr.compiler.path": "${env:arduino.path}/tools/avr-gcc/7.3.0-atmel3.6.1-arduino7/bin/avr-g++",
"arduino.libraries.path": "${HOME}/Arduino/libraries",
"dummy-last-line": "To allow the second to last line (e.g. the real last line) to always end with a comma"
},
"configurations": [
{
@EndruK
EndruK / copy_files.sh
Created October 30, 2020 16:57
copy files from one directory to another based on a file selection list with rsync
#!/bin/bash
# Script Usage
# create a file holding only the names of files / folders to copy
#
# ls -A1 > file_selection.txt
#
# remove all lines which should not be copied
#
# move to the folder where the files are and run the script:
@EndruK
EndruK / nice2havejupyter.md
Created June 4, 2020 12:55
nice2have jupyter extensions
@EndruK
EndruK / watermark
Created May 5, 2020 09:47
Add watermarks to images
#!/bin/bash
# requires imagemagick
convert input.jpg -fill grey -background transparent -pointsize 100 -gravity center -draw "rotate -20 text 0 0 'Copyright Text'" output.jpg
@EndruK
EndruK / parse_nvidia_smi.py
Created April 30, 2020 15:04
functions to parse nvidia-smi
import subprocess
def get_nvidia_smi_string(id=-1):
"""
Get nvidia-smi result either for the system or for a specific GPU
:param id: PCI GPU id (default=1 for system)
:return: nvidia-smi string
"""
if id == -1:
nvidia_smi = subprocess.run(["nvidia-smi", "-q"], stdout=subprocess.PIPE)
@EndruK
EndruK / SD_card_Reader_how_to.md
Created January 24, 2020 14:40
Realtek RTS5229 module process

Description

  • Machine: Fujitsu Lifebook S762
  • SD Card Reader: Realtek RTS5229

HowTo

Install Realtek Driver

git clone https://github.com/Zibri/Realtek-rts5229-linux-driver.git
sudo mkdir /usr/src/rts5229-1.07
sudo cp Realtek-rts5229-linux-driver/* /usr/src/rts5229-1.07
@EndruK
EndruK / gist:36ce3962a74a36c1a6eeecd4b15ecd4d
Created September 30, 2019 07:32
Pulseaudio initial delay fix
- edit /etc/pulse/default.pa
- comment out the line: "load-module module-suspend-on-idle"
@EndruK
EndruK / convert.sh
Created August 13, 2019 14:19
convert files in linux from any charset to UTF-8 - Created by LEXO, http://www.lexo.ch
#!/bin/bash
# Created by LEXO, http://www.lexo.ch
# Version 1.0
#
# This bash script converts all files from within a given directory from any charset to UTF-8 recursively
# It takes track of those files that cannot be converted automatically. Usually this happens when the original charset
# cannot be recognized. In that case you should load the corresponding file into a development editor like Netbeans
# or Komodo and apply the UTF-8 charset manually.
#
https://arnowelzel.de/pioneer-av-receiver-uebers-netzwerk-steuern
_______ _______ _______ _____
| | | |_ _| \
| | - | | | | -- |
|__|_|__|_______| |___| |_____/
_______ __
| __|.-----.-----.-----.----.---.-.| |_.-----.----.
| | || -__| | -__| _| _ || _| _ | _|
|_______||_____|__|__|_____|__| |___._||____|_____|__|