Skip to content

Instantly share code, notes, and snippets.

View HQJaTu's full-sized avatar
💭
Hacking

Jari Turkia HQJaTu

💭
Hacking
View GitHub Profile
@HQJaTu
HQJaTu / wicked-6rd-tunnel.py
Last active February 4, 2024 17:32
OpenSuse wicked 6RD tunnel setup
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
import os
import sys
import argparse
import ipaddress
import netifaces
from lxml import etree as ET
@HQJaTu
HQJaTu / Get-Windows-Version.ps1
Created October 28, 2020 11:53
Get exact Windows version with PowerShell Core
#Requires -Version 6.0
<#
The MIT License (MIT)
Copyright (c) 2020 Jari Turkia (jatu@hqcodeshop.fi)
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
@HQJaTu
HQJaTu / gist:1f6b2ed67ae53b24fd3f350f611e7eb1
Created September 27, 2020 18:42 — forked from petri/gist:46bb6b8eac8ea5b8f01c90e7414d7951
Python asyncio ordering test - single-connection multiplex version with asyncio.Queue
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# Proof-of-Concept for https://stackoverflow.com/q/64017656/1548275
# Do Python asyncio Streams maintain order over multiple writers and readers?
import sys
import argparse
@HQJaTu
HQJaTu / gist:345f7147065f1e10587169dc36cc1edb
Created September 23, 2020 07:34
Python asyncio ordering test
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# Proof-of-Concept for https://stackoverflow.com/q/64017656/1548275
# Do Python asyncio Streams maintain order over multiple writers and readers?
import sys
import argparse
@HQJaTu
HQJaTu / trigger-Azure-CDN-certificate-update.ps1
Created June 18, 2019 18:57
Azure CDN certificate update trigger
#Requires -Version 6.0
<#
The MIT License (MIT)
Copyright (c) 2019 Jari Turkia (jatu@hqcodeshop.fi)
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
@HQJaTu
HQJaTu / ipmi-updater.py
Last active April 22, 2024 19:00
Supermicro IPMI certificate updater
#!/usr/bin/env python3
# vim: autoindent tabstop=4 shiftwidth=4 expandtab softtabstop=4 filetype=python
# This file is part of Supermicro IPMI certificate updater.
# Supermicro IPMI certificate updater is free software: you can
# redistribute it and/or modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@HQJaTu
HQJaTu / gist:cd66cf659b8ee633685b43c5e7e92f05
Last active January 13, 2021 23:59 — forked from vpetersson/gist:f20efe6194460cc28d49
Parse and dump a sitemap (using Python)
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Inspired by Craig Addyman (http://www.craigaddyman.com/parse-an-xml-sitemap-with-python/)
Enhanced by Viktor Petersson (http://viktorpetersson.com) / @vpetersson
Enhanced by Jari Turkia (https://blog.hqcodeshop.fi/) / @HQJaTu
"""
from bs4 import BeautifulSoup