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
#!/bin/bash
echo
echo "*******************"
echo "* Pull New Images *"
echo "*******************"
echo
docker-compose pull
echo
#!/bin/bash
set -e
#imports
. /etc/default/backup
# config
NAME=$1
@tyrm
tyrm / mastodon_db_backup.sh
Last active December 24, 2022 21:22
DB Backup
#!/bin/bash
set -e
. /etc/default/backup
INSTANCE=$1
case $INSTANCE in
package main
import (
"fmt"
"time"
"sync"
)
func main() {
wg := &sync.WaitGroup{}

awesome-homelab

Dell

iDRAC

  • Set iDrac settings using System Boot Menu
    • Set Static IP: F2 > iDrac settings > Network
    • Set Username / Password: F2 > iDrac settings > Access
  • Flash iDRAC7_LocalLicense_Installation_Tool_A00_1.0.iso using dd to USB
  • 30 day evaluation license and enabled dedicated iDrac NIC
@dbeinder
dbeinder / Program.cs
Last active September 15, 2022 02:51
X509Chain platform differences, SslStreamCertificateContext test server
using System;
using System.Net;
using System.Net.Security;
using System.Net.Sockets;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
namespace X509Test
{
@PhilipSchmid
PhilipSchmid / 0-rancher-vsphere-setup.md
Last active August 1, 2023 17:47
How to set up a Rancher K8s cluster on VMware (incl. vSphere StorageClass)

Rancher K8s Cluster on VMware vSphere

Prerequisites

vCenter Configuration

@g105b
g105b / curlpool.sh
Last active March 11, 2024 06:17
Pool 100 parallel curl requests at a time
#!/bin/bash
target=${1:-http://example.com}
while true # loop forever, until ctrl+c pressed.
do
for i in $(seq 100) # perfrom the inner command 100 times.
do
curl $target > /dev/null & # send out a curl request, the & indicates not to wait for the response.
done
wait # after 100 requests are sent out, wait for their processes to finish before the next iteration.
public class DistributedMutex {
private readonly string key;
private readonly string storageConnectionString;
private readonly string storageContainerName;
private CloudBlobClient blobClient;
private string leaseId;
public DistributedMutex(string storageConnectionString, string storageContainerName, string key)
{
this.key = key;
@matthewjberger
matthewjberger / instructions.md
Last active September 19, 2024 06:35
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