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
@m0veax
m0veax / prevent_lockscreen.vbs
Last active April 23, 2019 08:56
Disable auto the Windows Lock-Screen feature for reasons
REM Source: https://stackoverflow.com/a/4507364
set wsc = CreateObject("WScript.Shell")
Do
WScript.Sleep (60*1000)
wsc.SendKeys ("{SCROLLLOCK 2}")
Loop
@m0veax
m0veax / commands.md
Last active May 9, 2019 08:11
Useful dev CMD command collection

Commands i need from time to time on windows boxes

Remote CMD

winrs -r:<REMOTEHOST> cmd.exe

Spawns a cmd.exe shell per remote connection which is nice, because you don't need to do a full RDP Connection

@m0veax
m0veax / symfony_cheat_sheet.md
Created May 10, 2019 06:52
symfony console cheat sheet

Symfony Console Cheat Sheet

Serve

php bin/console server:start *:8080

Listen on all Interfaces at port 8080

@m0veax
m0veax / excel_cheat_sheet.md
Last active May 15, 2019 12:42
excel cheat sheet (german)

Excel Befehle die ich immer wieder brauche

Erste 3 Zeichen löschen

    =RECHTS(A1;LÄNGE(A1)-3) 

Ver"und"dieren bzw concat

Um beispielsweise mal Flott einen SQL Query aus einer Excel Datei zu erzeugen ist folgendes hilfreich

@m0veax
m0veax / W3_APP_GEN_Doctrine.sql
Last active October 15, 2021 07:03
Generate Doctrine Entity from SQLServer
USE [DB_NAME]
GO
/****** Object: StoredProcedure [dbo].[W3_APP_GEN_Doctrine] Script Date: 03.09.2019 09:18:59
FOUND HERE: https://stackoverflow.com/a/35901836
Updates I did:
- Save some lines, because SQL Server Terminates at some number of lines
- Added timestamp type
@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+"\/>/
@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 / 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 / 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 / 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/