Skip to content

Instantly share code, notes, and snippets.

View m0veax's full-sized avatar
🐱
🥙

Patrick Kilter m0veax

🐱
🥙
  • Vivawest Wohnen GmbH
  • Germany, Gladbeck
View GitHub Profile
package main
// thanks to hanemille
import (
"fmt"
"io"
"net/http"
"os"
"strings"
@m0veax
m0veax / win11_window_shortcuts.md
Last active September 9, 2024 11:03
Win11 window management shortcuts
Shortcut Description
win + ctrl + d create virtual desktop
win + ctrl + → go to virtual desktop on the right
win + ctrl + ← go to virtual desktop on the left
win + tab open task view (including virtual desktops)
win + z open snap layouts and choose layout by number
win + ↑ (or ↓) max- / minimize window
win + alt + ↑ (or ↓, ←, →) snap window to part of the screen
win + shift + ↑ (or ↓, ←, →) move window to monitor in direction
@m0veax
m0veax / test.ps1
Last active May 27, 2024 12:18
Powershell to test a connection
# create json object
$params = @{ `
'element' = 'value' `
}
Write-Output "defined parameters"
# start dialog to get authentification data
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<title></title>
<script>
if (navigator.appName === 'Microsoft Internet Explorer') {
var bVersion = ((navigator.appVersion).split(";"))[1];
var bNum = Number((bVersion.split("MSIE"))[1]);
@m0veax
m0veax / enum3.rs
Last active December 1, 2023 22:21
rustlings problem
// enums3.rs
//
// Address all the TODOs to make the tests pass!
//
// Execute `rustlings hint enums3` or use the `hint` watch subcommand for a
// hint.
// I AM NOT DONE
enum Message {
@m0veax
m0veax / wordclock.ino
Created July 1, 2023 21:40
Da ich meine Uhr falsch verdrahtet habe, musste ich die LED Reihenfolge umstellen, damit es rund läuft ;)
/**
* @file wordclock.ino
* @author telegnom ([email protected])
* @date 2019-02-23
* @version 1.1
*
* @brief firmware for the c3e wordclock
*
* requires the time.h and timezone.h libraries
* https://github.com/PaulStoffregen/Time/
@m0veax
m0veax / MultipleDevicesOverTCP.md
Created November 19, 2020 05:58 — forked from teocci/MultipleDevicesOverTCP.md
How to connect multiple Android devices with ADB over TCP

#How to connect multiple Android devices with ADB over TCP

From your device, if it is rooted

According to a post on xda-developers, you can enable ADB over Wi-Fi from the device with the commands:

su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
@m0veax
m0veax / check_syntax.php
Created October 29, 2020 13:36
Recursive PHP Syntax Check
<?php
$it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator('.'));
$regx = new RegexIterator($it, '/^.*\.php$/i', // only matched text will be returned
RecursiveRegexIterator::GET_MATCH);
foreach ($regx as $file) {
$file = $file[0];
exec('php -l ' . $file); //check the syntax here
}
@m0veax
m0veax / redirect_console_to_div.js
Created July 22, 2020 09:14
Redirect console output to a given div
// SOURCE https://stackoverflow.com/questions/16616722/sending-all-javascript-console-output-into-a-dom-element
var baseLogFunction = console.log;
console.log = function(){
baseLogFunction.apply(console, arguments);
var args = Array.prototype.slice.call(arguments);
for(var i=0;i<args.length;i++){
var node = createLogNode(args[i]);
@m0veax
m0veax / pattern.regex
Created March 30, 2020 19:43
Find XLSX Sheet Protection element by regex
/<sheetProtection algorithmName="SHA-512" hashValue=".*" saltValue=".*" spinCount="\d+" sheet="\d+" objects="\d+" scenarios="\d+"\/>/