Skip to content

Instantly share code, notes, and snippets.

View ElanHasson's full-sized avatar
Building Stuff

Elan Hasson ElanHasson

Building Stuff
View GitHub Profile
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Temporalio.Client;
using Temporalio.Extensions.Hosting;
namespace Microsoft.Extensions.DependencyInjection;
/// <summary>
ElanHasson /
Last active April 9, 2024 03:01
This script deletes all PVCs and restarted degraded pods.
# Get all PVs in the 'Released' state in JSON format
RELEASED_PVS_JSON=$(kubectl get pv -o json | jq -r '.items[] | select(.status.phase == "Released")')
# Check if there are no 'Released' PVs
if [ -z "$RELEASED_PVS_JSON" ]; then
echo "No PVs in 'Released' state found."
exit 0
ElanHasson / README
Created March 25, 2023 02:33 — forked from xbb/README
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
ElanHasson /
Created January 30, 2023 19:53 — forked from matthewjberger/
Install a nerd font on ubuntu

1.) Download a Nerd Font

2.) Unzip and copy to ~/.fonts

3.) Run the command fc-cache -fv to manually rebuild the font cache

Find and create a partition with free space:

# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print free
Model: ATA Crucial_CT240M50 (scsi)
Disk /dev/sda: 240GB
Sector size (logical/physical): 512B/4096B
ElanHasson / relays.txt
Created January 12, 2023 17:25
Mastodon Relays
ElanHasson / Fediverse Moderation Tools
Last active October 31, 2023 14:54
Fediverse Moderation Tools Proposal

2023-10-25: The name FediMod and all assets have been transfered to @thisismissem and this document's title and references to FediMod have been replaced with The System .

NOTE: below is the first draft, I'm working to incorporate feedback into it from various folks. Below is a summary of the feedback

To be clear:

Everything would be opt-in by default and admins and mods can choose which other admins or mods see what they're sharing. Think Circles in Google+, as some things they may want to share with one group and other things with another group. They may even choose to share 100% publicly with anyone verified mod or admin.

There would be no centralized authority here-- everything would be run over ActivityPub.

ElanHasson / AssemblyInformation.cs
Last active August 12, 2022 19:06
Adding Git Commit Hash to your .NET project assemblies.
using System.Reflection;
public record class AssemblyInformation(string Product, string Description, string Version, string InformationalVersion)
public static readonly AssemblyInformation Current = new(typeof(AssemblyInformation).Assembly);
public AssemblyInformation(Assembly assembly)
: this(
ElanHasson /
Created April 9, 2022 21:20 — forked from g105b/
Pool 100 parallel curl requests at a time
while true # loop forever, until ctrl+c pressed.
for i in $(seq 100) # perfrom the inner command 100 times.
curl $target > /dev/null & # send out a curl request, the & indicates not to wait for the response.
wait # after 100 requests are sent out, wait for their processes to finish before the next iteration.
ElanHasson /
Created November 20, 2021 03:43 — forked from trey/
Change the email address for a git commit.

Change the email address for a git commit.

$ git commit --amend --author="Author Name <>"


$ git commit --amend --reset-author