Skip to content

Instantly share code, notes, and snippets.

View tmeckel's full-sized avatar
👋
The IT nerd from next door. Passionate about automation

Thomas Meckel tmeckel

👋
The IT nerd from next door. Passionate about automation
View GitHub Profile
@Aldaviva
Aldaviva / Windows 10 & 11 services.md
Last active September 6, 2024 14:05
Safety of disabling services in Windows 10 and 11

These settings apply to normal, functioning Windows 10 and 11 Pro desktops and laptops with

  • wired Ethernet
  • Wi-Fi
  • Bluetooth
  • IPv4
  • IPv6
  • no touch screen

Safe to disable

@mzpqnxow
mzpqnxow / pbr.md
Last active December 23, 2022 16:39
Multiple default routes in Azure - solving with policy-based routing

Azure and Public IP Addresses

In Microsoft Azure, even when a VM has a public IP address internface, the system sees it as a private network address. It also uses a private IP address as the gateway. The only way to "fix" this without making routing table changes is to use setsockopt() with SO_BINDTODEVICE, which is a privileged operation. In addition to that (and this can't be worked around in any generic way) you will need to do the standard socket bind() with the private IP address corresponding to the interface you want to use.

Solving With Policy Based Routing

The new generation of network configuration tools (I guess they're not that new, but they replaced route and ifconfig) makes policy-based routing pretty easy, especially if you don't require anything too special

Set Up Name Mappings for Routing Tables (Optional)

@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active September 15, 2024 20:56
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active September 20, 2024 05:52
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@MuhsinFatih
MuhsinFatih / fix-macos-python.md
Last active September 20, 2024 12:14
How to recover from messed up python installation on mac, and never have to mess with apple's shitty python confusion factory

I am assuming you are here because like me, you installed a bazillion different python interpreters on mac and the whole thing is a spagetti. Today, I finally fixed my python installation. Whatever I install for python2 or python3 using pip JUST.WORKS.. My god! finally.

What the hell?

Here is what I had messed up, which you also probably did:

  • I had too many different python interpreters
  • Too many different symlinks which I lost track of
  • almost no package I installed with pip worked without a headache
  • any attempt to fix using online resources made it worse.
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active September 20, 2024 10:53
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

@marknettle
marknettle / azure_firewall.kusto
Created October 18, 2018 21:51
Kusto query to extract useful fields from Azure Firewall logs
AzureDiagnostics
| where ResourceType == "AZUREFIREWALLS"
| extend
proto = extract(@"^([A-Z]+) ",1,msg_s)
,src_host = extract(@"request from ([\d\.]*)",1,msg_s)
,src_port = extract(@"request from [\d\.]*:(\d+)",1,msg_s)
,dest_host = extract(@" to ([-\w\.]+)(:|\. |\.$)",1,msg_s)
,dest_port = extract(@" to [-\w\.]+:(\d+)",1,msg_s)
,action = iif(
msg_s has "was denied"
@AveYo
AveYo / .. MediaCreationTool.bat ..md
Last active September 13, 2024 03:14
Universal MediaCreationTool wrapper for all MCT Windows 10 versions - MOVED TO github.com/AveYo/MediaCreationTool.bat
@noelbundick
noelbundick / LICENSE
Last active September 17, 2024 11:37
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@alexishida
alexishida / nginx-config-auth-cert-ssl.md
Last active July 1, 2024 14:17
Tutorial to configure Nginx client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.

Original: https://gist.github.com/mtigas/952344

Convert SSL certificate from CRT format to PEM

openssl x509 -in server.crt -out server.der -outform DER
openssl x509 -in server.der -inform DER -out server.pem -outform PEM