Skip to content

Instantly share code, notes, and snippets.

View superjojo140's full-sized avatar

Johannes Schnirring superjojo140

View GitHub Profile
@superjojo140
superjojo140 / windows_password_reset.md
Last active April 9, 2024 09:04
Windows password reset

Thsi is a guide to reset your local windows password.

⚠️ If you dont exactly understand what you do here, this could break your operating system. Please be carefull!

1. Boot from live system

Boot from another live operating system, for example from a USB stick with Linux or something similar (e.g. http://www.knoppix.org/). You need a console where you can access the hard disk of the computer.

You can also use the Windows installation CD. You can open the command line in the installation screen with SHIFT + F10

@superjojo140
superjojo140 / reset_plasma_screen.sh
Created October 18, 2023 12:57
Reset screen settings in KDE Plasma by CLI
#!/bin/bash
rm -rf ~/.cache
rm -rf ~/.config/kwinrc ~/.config/kwinrulesrc
rm -rf ~/.local/share/kscreen
reboot
@superjojo140
superjojo140 / ical_notes.md
Created May 30, 2023 10:12
ICAL / ICS Syntax

ICAL / ICS Syntax

References

Defined in RFC5545
Nice to read on https://www.kanzaki.com/docs/ical/

Basics

Allways start file with BEGIN:VCALENDAR and end with END:VCALENDAR
Events allways start with BEGIN:VEVENT and end with END:VEVENT and are nested in VCALENDAR
Timezones are mandatory for recurring events and recommended for all events.

@superjojo140
superjojo140 / log_php_mails.md
Last active May 11, 2023 13:12
Log mails send with php's mail() function
  1. Create a folder to store the script and the mail logs.
mkdir /somewhere/phpmail
mkdir /somewhere/phpmail/mails
  1. Place the logmail.sh script in the phpmail folder
  2. Make sure the php process has write access to this folder:
chmod -R 777 /somewhere/phpmail
@superjojo140
superjojo140 / toggle_gammy.sh
Last active February 16, 2023 10:12
Simple shell script to toggle the application "gammy" by shortcut
#!/bin/bash
SERVICE="gammy"
if pgrep -x "$SERVICE" >/dev/null
then
pkill gammy&
else
gammy&
fi
@superjojo140
superjojo140 / format_date.php
Last active October 23, 2022 16:35
Print UTC datetime-string as locale date in PHP
<?php
$inputUtc = "2022-10-23T10:00:00";
$dateObject = date_create($inputUtc,timezone_open("UTC"));
print_r($dateObject);
$timestamp = date_timestamp_get($dateObject);
date_default_timezone_set("Europe/Berlin");
echo date("d.m.Y H:i",$timestamp);
@superjojo140
superjojo140 / tasks.svgz
Created October 20, 2022 10:42
KDE Plasma theme modificator for taskbar [depends on Chrome OS theme]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="svg2"
width="144"
height="126"
version="1.0"
viewBox="0 0 144 126"
sodipodi:docname="tasks.svgz"
inkscape:version="1.1 (c4e8f9ed74, 2021-05-24)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
@superjojo140
superjojo140 / compress_photos.sh
Created May 21, 2022 13:59
Batch compress photos with imagemagick
mogrify -strip -interlace Plane -gaussian-blur 0.05 -quality 20% *.jpg
@superjojo140
superjojo140 / git-ftp-cheatsheet.md
Last active February 8, 2024 12:49
Git-ftp cheatsheet (with auto tags)
@superjojo140
superjojo140 / ical_syntax.md
Last active November 11, 2024 12:56
iCalendar / ical / ics basic syntax

ICAL / ICS Syntax

References

Defined in RFC2445
Nice to read on https://www.kanzaki.com/docs/ical/

Basics

Allways start file with BEGIN:VCALENDAR and end with END:VCALENDAR
Events allways start with BEGIN:VEVENT and end with END:VEVENT and are nested in VCALENDAR
Timezones are mandatory for recurring events and recommended for all events.