Skip to content

Instantly share code, notes, and snippets.

View GottZ's full-sized avatar
🐝
The Bees Knees

Jan-Stefan Janetzky GottZ

🐝
The Bees Knees
View GitHub Profile
@trvswgnr
trvswgnr / compress_video
Last active February 5, 2025 20:37
portable shell script to compress videos with ffmpeg
#!/bin/sh
print_usage() {
echo "usage: compress_video <input_file>"
echo "supported formats: mp4, webm, mkv, mov, avi, flv"
}
get_extension() {
f="${1##*/}"
case "$f" in
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2025 06:58
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for non-video, non-activity quests! For stream/play quests use the desktop app!

Note

When doing stream quests, you need at least 1 other account in the vc!

How to use this script:

  1. Accept a quest under Discover -> Quests
@leandronsp
leandronsp / 001-README.md
Last active December 16, 2024 15:55
OOP in Bash script

OOP in Bash script

Wait, what?

Inspired by this awesome article.

Prelude about OOP

According to wikipedia, OOP is a programming paradigm or technique based on the concept of "objects". The object structure contain data and behaviour.

Data is the object's state, which should be isolated and must be private.

@vurpo
vurpo / surface-fix-eraser-and-touch.py
Last active December 27, 2024 19:42
https://github.com/StollD/linux-surface-fix-eraser but modified to also disable the touch screen when the pen is near the screen
#!/usr/bin/env python3
"""
Copyright 2019 StollD, 2019 vurpo
Original: https://github.com/StollD/linux-surface-fix-eraser
Licensed under GNU GPL version 3
"""
import os
import os.path
@vRobM
vRobM / Slack-Go-dARK.ps1
Created December 6, 2018 19:38
Make Slack Desktop for Windows have dARK mode using powershell.
// Ark Labs presents - Slack dARK mode
$slackBaseDir = "$env:LocalAppData\Slack"
$installations = Get-ChildItem $slackBaseDir -Directory | Where-Object { $_.Name.StartsWith("app-") }
$version = $installations | Sort-Object { [version]$_.Name.Substring(4) } | Select-Object -Last 1
Write-Output "Select highest intalled Slack version: $version";
$modAdded = $false;
$customContent = @'
@nuta
nuta / index.html
Last active June 14, 2024 01:03
CP2102 (used by ESP32-DevKitC) WebUSB device driver (deprecated: use Serial API instead: https://crbug.com/884928)
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>esptool.js</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/xterm.min.js" integrity="sha256-8rsVcpCnO6HdeJL84i0VdubjM42fjSmO8aONghdq3gc=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/xterm/2.9.2/xterm.min.css" integrity="sha256-w69o8Y6P5VZjfYFmn2KlqMU7TUi2I+oWObi8FLlVZZg=" crossorigin="anonymous" />
</head>
@hthighway
hthighway / plexcrypt.service
Last active October 12, 2018 21:49
PlexDrive + Rclone Crypt + UnionFS Mount
[Unit]
Description=RClone Mount (crypt)
AssertPathIsDirectory=/mnt/decrypt
After=plexdrive.service
Requires=plexdrive.service
PartOf=plexdrive.service
[Service]
Type=simple
User=username
@AllThingsSmitty
AllThingsSmitty / flexible-type.css
Last active February 21, 2017 10:17
Use :root for flexible type
/* This has been added to CSS Protips https://github.com/AllThingsSmitty/css-protips */
/* The type font size in a responsive layout should be able to adjust with each viewport.
You can calculate the font size based on the viewport height and width using :root */
:root {
font-size: calc(1vw + 1vh + .5vmin);
}
/* Now you can utilize the root em unit based on the value calculated by :root */
body {
@Chaser324
Chaser324 / GitHub-Forking.md
Last active April 27, 2025 14:35
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@nekman
nekman / jsf.md
Last active June 19, 2020 10:41
Don't use JSF

JSF?!

http://www.thoughtworks.com/radar/#/languages-and-frameworks/683 - ThoughtWorks Technology Radar - January 2014

We continue to see teams run into trouble using JSF -- JavaServer Faces -- and are recommending you avoid this technology. Teams seem to choose JSF because it is a J2EE standard without really evaluating whether the programming model suits them. We think JSF is flawed because it tries to abstract away HTML, CSS and HTTP, exactly the reverse of what modern web frameworks do. JSF, like ASP.NET webforms, attempts to create statefulness on top of the stateless protocol HTTP and ends up causing a whole host of problems involving shared server-side state. We are aware of the improvements in JSF 2.0, but think the model is fundamentally broken. We recommend teams use simple frameworks and embrace and understand web technologies including HTTP, HTML and CSS.


http://www.jfokus.se/jfokus/talks.jsp - Search for JSF... (one hit on why you should leave it)
http://architecture-musings.blo