Skip to content

Instantly share code, notes, and snippets.

View neuberpe's full-sized avatar

neuberpe

View GitHub Profile
@neuberpe
neuberpe / mouseduck.ino
Last active June 26, 2018 19:54
Small ruberduck-code for Digistump to prevent idle if pluged in
#include <DigiMouse.h>
void setup() {
DigiMouse.begin();}
void loop() {
DigiMouse.moveY(2);
DigiMouse.delay(500);
DigiMouse.moveY(-2);
DigiMouse.delay(120000);}
@neuberpe
neuberpe / twitch.py
Created June 26, 2018 20:05
small python app to start streamlink for twitch with the name of the streamer in in clippboard (win)
import tkinter as tk
import os
import time
root = tk.Tk()
# keep the window from showing
root.withdraw()
# read the clipboard
content = root.clipboard_get()
@neuberpe
neuberpe / led_fire.ino
Created June 29, 2018 10:29
A red and a yellow LED on an ATtiny45 to "simulate" fire
//LED Fire
int ledPin1=0;
int ledPin2=1;
void setup() {
// put your setup code here, to run once:
pinMode(ledPin1,OUTPUT);
pinMode(ledPin2,OUTPUT);
@neuberpe
neuberpe / city.py
Created December 12, 2018 10:43
Pixel Skyline drawing
#!/usr/bin/python
from tkinter import *
import random
root = Tk()
xs = 20
y0 = 370
def circle(Canvas,x,y,r,c):
@neuberpe
neuberpe / pixel_sky_line_2.py
Created May 24, 2019 11:23
V2 of my generic city pixel skyline
#!/usr/bin/python
from tkinter import *
import random
root = Tk()
#position of first buidling
xs = 13 #from left
y0 = 370 #from streetlevel
@neuberpe
neuberpe / mouse.bat
Created April 20, 2022 16:34
switch left/right mousebutton in windows
@echo off & title Swap left right buttons on mouse
set "s1=$m='[DllImport("user32.dll")]public static extern Int32 SwapMouseButton(Int32 bSwap);"
set "s2=public static void SwapMB(){ int isright=SwapMouseButton(1); if (isright != 0) { SwapMouseButton(0); } }';"
set "s3=add-type -name Import -member $m -namespace Dll; [Dll.Import]::SwapMB();"
set "ps_swapmousebutton=%s1%%s2%%s3%"
call powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -Command "%ps_swapmousebutton:"=\"%"
@neuberpe
neuberpe / wettr.bat
Created August 8, 2022 07:43
Open wttr.in in powershell (windows)
@echo off
mode con:cols=180 lines=100
PowerShell Invoke-RestMethod https://wttr.in/Vienna
pause
@neuberpe
neuberpe / 512.py
Created October 1, 2025 12:44
reszize a square png to 512x512. in terminal of location: pyton 512.py filename
from PIL import Image
import sys
datei=str(sys.argv[1])+".png"
im = Image.open(datei)
im1 = im.resize((512,512),Image.NEAREST)
im1 = im1.save(str(sys.argv[1])+"_big.png")