This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
kc-sync - Sync existing Keycloak users group memberships with IdM. | |
This script: | |
1. Creates all groups from IdM in Keycloak | |
2. Queries Keycloak for all users within the realm. | |
3. Finds the corresponding user within IdM. | |
4. Calculates which groups a given user should be added to/removed from. | |
5. Either shows the changes to be made or performs the previously calculated transactions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.local/share/applications/FastX3.desktop | |
[Desktop Entry] | |
Name=FastX3 | |
Version=1.0 | |
Type=Application | |
Terminal=false | |
Exec=/opt/FastX3/FastX3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -x | |
ip route flush proto bird | |
ip link list | grep cali | awk '{print $2}' | cut -c 1-15 | xargs -I {} ip link delete {} | |
rm -rf /etc/cni/net.d/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
int main() | |
{ | |
SendMessage(HWND_BROADCAST, WM_SYSCOMMAND, SC_MONITORPOWER, 2); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xdg-mime default org.gnome.Nautilus.desktop inode/directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* An alternative to qsort, with an identical interface. | |
This file is part of the GNU C Library. | |
Copyright (C) 1992-2023 Free Software Foundation, Inc. | |
The GNU C Library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public | |
License as published by the Free Software Foundation; either | |
version 2.1 of the License, or (at your option) any later version. | |
The GNU C Library is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Flashing the Nvidia Jetson Xavier NGX | |
# Good luck, Nvidia - as usual - did not make this easy for anyone. | |
# (this is a massive pain on non-ubuntu hosts). | |
# | |
# 1. Install these packages | |
# | |
# $ sudo pacman -S qemu-user-static qemu-user-binfmt | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
Convert malformed calendar entries into Org-Agenda TODO items. | |
Usage: | |
1. Export Canvas calendar to Google Calendar. | |
2. Export Google Calendar to ICS. | |
3. Load ICS into Emacs iCal. | |
4. Pipe contents of Emacs iCal schedule into this script. (cat school_schedule.org | ./cal.py > physics.org) | |
5. Profit? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
MIT License | |
Copyright (c) 2022 Joshua Arulsamy | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
"""Get all the Github repositories for the currently authenticated gh-cli user.""" | |
import json | |
import os | |
import subprocess | |
from pathlib import Path | |
from typing import Union | |
import requests |
NewerOlder