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
<!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 (ccc@telegnom.org)
* @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+"\/>/
@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 / 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 / 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