Skip to content

Instantly share code, notes, and snippets.

View benstigsen's full-sized avatar

Benjamin Stigsen benstigsen

View GitHub Profile
@benstigsen
benstigsen / ScriptMaker.bat
Last active December 7, 2018 17:53
Create .bat scripts easily.
REM ( ------------ ))
REM (( Created By PhantomScripts ))
REM ( ------------ ))
:Configuration
@echo off
color 0A
mode 1000
REM // Main Menu <--------- START
@benstigsen
benstigsen / WebDownloader.py
Last active July 19, 2017 02:57
Download GitHub projects and YouTube videos/audio
# Made by Tearzz / PhantomScripts
import pafy, pip, time
print(" WebDownloader ")
print("----------------------")
print(" By PhantomScripts ")
print("\n")
# Variables
option = 1
@benstigsen
benstigsen / Overhaul.bat
Last active July 22, 2017 06:10
Was made to fix computer problems.
REM ( ------------ ))
REM (( Created By PhantomScripts ))
REM ( ------------ ))
:Configuration
@echo off
color 0A
mode 1000
REM // If folder "Files" exists say nothing ELSE create folder "Files"
@benstigsen
benstigsen / TwitchBot.rb
Last active September 6, 2019 10:06
Twitch chat bot written in Ruby
# bot.rb
require 'socket'
require 'logger'
# Create logger
log = Logger.new("log.txt")
# Required Info
PASS = "oauth:xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" # "oauth:YourOauthToken" https://twitchapps.com/tmi/ <--- REQUIRED <--- REQUIRED
NICK = "botname" # Name of bot <--- REQUIRED <--- REQUIRED
@benstigsen
benstigsen / MPA-QR.py
Created March 18, 2019 21:13
Python script to generate a QR for MobilePay
import PySimpleGUI as sg
import qrcode
text = sg.PopupGetText("Telefonnummer / BoxID", "12345678 / box12345")
amount = sg.PopupGetText("Automatisk Beløb", "0")
text = text.lower()
text = text.replace(" ", "")
text = text.replace("box", "")
text = text.strip()
@benstigsen
benstigsen / PNGtoJPG.py
Created October 29, 2019 21:47
Convert all PNG images in a folder (including subdirectories), to JPG.
import os
from PIL import Image
Image.MAX_IMAGE_PIXELS = None
def convert(folder_path, delete_old = True):
for root, dirs, files in os.walk(folder_path):
print(root)
for filename in files:
if ".png" in filename:
@benstigsen
benstigsen / PomodoroWin.py
Created January 5, 2020 20:10
Pomodoro Windows timer (includes audio feedback)
import time, winsound, os
def clear():
os.system("cls||clear")
def playTone(frequency, duration, repeat):
for _ in range(repeat):
winsound.Beep(frequency, duration)
def work(duration = 1200, text = "-"):
@benstigsen
benstigsen / binance.py
Last active April 26, 2023 03:44
Small Python script to keep track of the Binance stocks and alert on low / high price (Windows)
'''
binance.py
To add crypto values add them to the <watchlist> dictionary:
"ZECBNB": {
"a": "ZEC",
"b": "BNB",
# Price coin
"pc": [2, 4]
@benstigsen
benstigsen / vtuber.py
Last active January 14, 2021 17:55
Small Python script to animate character depending on voice volume (used with OBS virtual cam in school calls)
from PIL import Image
import aubio
import pygame
import pyaudio
import numpy as np
import glob
PATH = "happyboy1"
METHOD = "default"
PERIOD_SIZE_IN_FRAME = 2048 // 2