Skip to content

Instantly share code, notes, and snippets.

View adiroiban's full-sized avatar
🇺🇦
Slava Ukraini!

Adi Roiban adiroiban

🇺🇦
Slava Ukraini!
View GitHub Profile
@adiroiban
adiroiban / Get-HNSNetwork
Last active November 7, 2023 00:37
Calico Windows VxLAN bare-metal
Get-HNSNetwork
ActivityId : B17F2C60-D0F2-4DB0-A289-3EDAC3BD9A40
AdditionalParams :
CurrentEndpointCount : 0
DNSServerCompartment : 3
DrMacAddress : 00-15-5D-EE-77-9E
Extensions : {@{Id=E7C3B2F0-F3C5-48DF-AF2B-10FED6D72E7A; IsEnabled=False; Name=Microsoft Windows Filtering Platform},
@{Id=F74F241B-440F-4433-BB28-00F89EAD20D8; IsEnabled=True; Name=Microsoft Azure VFP Switch Extension},
@adiroiban
adiroiban / file.log
Created October 23, 2023 16:32
ARC constoller logs
$ kubectl logs -n arc-runners arc-gha-rs-controller-768bbf89f6-zwkdg
Error from server (NotFound): pods "arc-gha-rs-controller-768bbf89f6-zwkdg" not found
✘-1 ~/chevah/server [6279-arc-linux-arm64|✚ 2⚑ 6]
17:29 $ kubectl logs -n arc-systems arc-gha-rs-controller-768bbf89f6-zwkdg
2023-10-22T07:05:14Z INFO Update strategy set to: {"updateStrategy": "immediate"}
2023-10-22T07:05:14Z INFO AutoscalingListener image pull policy changed {"ImagePullPolicy": "IfNotPresent"}
2023-10-22T07:05:14Z INFO AutoscalingListener logging parameters changed {"LogLevel": "debug", "LogFormat": "text"}
2023-10-22T07:05:14Z INFO Registering scale set metrics
2023-10-22T07:05:14Z INFO starting manager
2023-10-22T07:05:14Z INFO Starting EventSource {"controller": "autoscalingrunnerset", "controllerGroup": "actions.github.com", "controllerKind": "AutoscalingRunnerSet", "source": "kind source: *v1alpha1.AutoscalingRunnerSet"}
@adiroiban
adiroiban / gha_try.yaml
Last active September 1, 2022 12:54
GitHub Actions poor man's replacement for the awesome Buildbot try tool.
#
# A workflow which is only available for manual trigger.
#
name: Try-Patch
on:
workflow_dispatch:
inputs:
tests:
description: Run selected tests
@adiroiban
adiroiban / list.txt
Created July 15, 2022 16:03
Legacy Twisted public lists
/var/lib/mailman/archives/public$ ls -1
divunal-author
divunal-author.mbox
divunal-devel
divunal-devel.mbox
divunal-list
divunal-list.mbox
divunal-players.mbox
inheritance
inheritance.mbox
@adiroiban
adiroiban / i18n_subsites.py
Created March 23, 2022 10:35
My fork for pelican i18n sub-sites
"""i18n_subsites plugin creates i18n-ized subsites of the default site
This plugin is designed for Pelican 3.4 and later
"""
import os
import six
import logging
import posixpath
@adiroiban
adiroiban / 1_radius_chap.py
Last active July 8, 2022 11:09
Python RADIUS client CHAP / MS-CHAP-v1 / MS-CHAP-v2
# Code under public domain.
"""
Authentication based on a remote RADIUS server.
"""
from __future__ import absolute_import, unicode_literals
import contextlib
import os
import socket
import struct
import hashlib
@adiroiban
adiroiban / lets_encrypt.py
Created July 18, 2021 11:43
chevah txacme
# Copyright (c) 2018 Adi Roiban.
# See LICENSE for details.
"""
Act as ACME client to generate and renew SSL certificates from Let's Encrypt.
The certificates are then set to each SSL service and the service
is restarted if required.
The task of updating the service configuration is done by the
certificate storage.
@adiroiban
adiroiban / pp2.py
Created July 6, 2021 19:02
ProxyProtocol v2 wrapper
"""
Proxy protocol support.
Code based on https://github.com/icgood/proxy-protocol
http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt
"""
from __future__ import unicode_literals
import socket
import struct
13:15 $ git alias
ae = !/opt/sublime_text/sublime_text ~/.gitconfig
b = branch
st = status -s
ci = commit -a
ca = commit -a --amend --no-edit
push = push --tags
db = branch -d
dr = push origin --delete
rb = branch -m
@adiroiban
adiroiban / gist:288b7f55553cd43bf02050d911b20575
Created April 20, 2021 12:31
pypy-3.7-alldeps-nocov-posix twisted failure on 2eeaacb
https://github.com/twisted/twisted/runs/2372418216#step:9:18222
FAIL]
Traceback (most recent call last):
File "/home/runner/work/twisted/twisted/.tox/alldeps-nocov-posix/site-packages/twisted/words/test/test_irc.py", line 940, in test_ERRMSG
self.assertEqualBufferValue(reply, errReply)
File "/home/runner/work/twisted/twisted/.tox/alldeps-nocov-posix/site-packages/twisted/words/test/test_irc.py", line 38, in assertEqualBufferValue
self.assertEqual(bufferValue, val)
File "/home/runner/work/twisted/twisted/.tox/alldeps-nocov-posix/site-packages/twisted/trial/_synctest.py", line 424, in assertEqual