Skip to content

Instantly share code, notes, and snippets.

View wey-gu's full-sized avatar
🥝
Believe in OpenSource and build in public w/ magic to help others do the same.

Wey Gu wey-gu

🥝
Believe in OpenSource and build in public w/ magic to help others do the same.
View GitHub Profile
#!/bin/zsh
printf "%dGi/32Gi" $(cat /proc/meminfo | awk '{print $2}' | head -n 2 | tail -n 1)/1024/1024
<#
.SYNOPSIS
Retries a powershell command n-times.
.DESCRIPTION
The cmdlet is capable of retrying a PowerShell command passed as a [ScriptBlock] according to the user defined number of retries and timeout (In Seconds)
.PARAMETER TimeoutInSecs
Timeout in secods for each retry.
@nickgrealy
nickgrealy / slack_emoticons_to_html_unicode.json
Created August 17, 2018 06:20
slack_emoticons_to_html_unicode.json
{
"+1": "&#x1F44D;",
"-1": "&#x1F44E;",
"100": "&#x1F4AF;",
"1234": "&#x1F522;",
"8ball": "&#x1F3B1;",
"ab": "&#x1F18E;",
"abc": "&#x1F524;",
"abcd": "&#x1F521;",
"accept": "&#x1F251;",
@arax
arax / OIDC.jpg
Last active October 23, 2023 17:31
OpenStack with OpenID Connect and OAuth 2.0
OIDC.jpg
@shr00mie
shr00mie / letsencrypt_esxi.sh
Last active June 13, 2024 22:32
Let's Encrypt SSL for ESXi
#!/bin/bash
#
## -----------------------------=[ WARNING ]=-------------------------------- ##
#
# This script is now woefully out of date due to which accounts ESXi allows to
# ssh into the box as well as sticky folders/file flags.
# I've since ported the whole thing to python with a lot of bells and whistles
# and if i get around to making it public, i'll put a link here.
#
## -------------------------------=[ Info ]=--------------------------------- ##
@abridgland
abridgland / gaussian-processes-1.ipynb
Last active February 19, 2025 00:55
A Jupyter notebook to accompany Intro to Gaussian Processes - Part I at http://bridg.land/posts/gaussian-processes-1
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Aethylred
Aethylred / freeipa_auth_suse.md
Last active February 9, 2025 12:59
Setting up FreeIPA authentication onf SUSE/SLE 12 SP2

This is the manual process for enrolling a host running SUSE/SLE 12 SP2 with FreeIPA.

The following reference documentation was used to create this process:

I do not recommend using yast to set this up, however it is useful to check if the configuration is valid. SUSE/SLE has all the required packages to use FreeIPA but does not have the conveinent ipa-client tools, such as ipa-client-install.

Pre-Requisites

@thomasdarimont
thomasdarimont / app.py
Last active May 6, 2025 12:41
Simple python example using flask, flask_oidc and keycloak
import json
import logging
from flask import Flask, g
from flask_oidc import OpenIDConnect
import requests
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 7, 2025 20:12
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux