Skip to content

Instantly share code, notes, and snippets.

View 0xMH's full-sized avatar
💤

Hamza 0xMH

💤
View GitHub Profile
@ayebrian
ayebrian / vmware.md
Last active July 23, 2024 11:01
VMware ESXi 8 / vCenter 8 / Workstation 17 license key 2024

Free VMware license keys, they should work. It works for all cores on your host system(ESXi).

vCenter Server 8 Standard

Key Tested
4F282-0MLD2-M8869-T89G0-CF240
0F41K-0MJ4H-M88U1-0C3N0-0A214

vCenter Server 7

Key Tested
dynamic "statement" {
for_each = [for s in var.additional_bucket_policy_statements : {
sid = lookup(s, "sid", null)
effect = lookup(s, "effect", null)
actions = lookup(s, "actions", null)
resources = lookup(s, "resources", null)
principals = lookup(s, "principals", null)
condition = lookup(s, "condition", null)
}]
@glnds
glnds / aws-transfer-sftp.yaml
Last active February 23, 2024 09:53
CloudFormation template for AWS Transfer for SFTP
---
AWSTemplateFormatVersion: '2010-09-09'
Description: some-sftp-server
Parameters:
HostedZoneIdParam:
Type: String
Description: Hosted Zone ID
SFTPHostnameParam:
Type: String
@vitobotta
vitobotta / gist:45f62ca44bfa19196bc2e44c9ec42b8b
Created April 14, 2019 10:15
Install Rook/Ceph with Rancher deployed cluster
- In Rancher, edit cluster, then edit Cluster Options as yaml and change the kubelet section as follows if needed:
```
kubelet:
extra_args:
volume-plugin-dir: "/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
extra_binds:
- "/usr/libexec/kubernetes/kubelet-plugins/volume/exec:/usr/libexec/kubernetes/kubelet-plugins/volume/exec"
fail_swap_on: false
```
@alranel
alranel / block_personal_appts.js
Last active January 23, 2023 15:10 — forked from ttrahan/block_personal_appts
Google Apps Script to automatically create, edit and delete events on work calendar for personal calendar events. Inspired by @willroman's work but heavily changed. Instructions on how to set up can be found in the original post: https://medium.com/@willroman/auto-block-time-on-your-work-google-calendar-for-your-personal-events-2a752ae91dab
var source_calendars = [
'xxx',
];
function sync() {
var today = new Date();
var enddate = new Date();
enddate.setDate(today.getDate()+90); // how many days in advance to monitor and block off time
var sourceEvents = [];
@javipolo
javipolo / set-tmux-title
Last active November 29, 2023 09:31 — forked from florianbeer/set-tmux-title
Set tmux pane title to short hostname on ssh connections
# Make short hostname only if its not an IP address
__tm_get_hostname(){
local HOST="$(echo $* | rev | cut -d ' ' -f 1 | rev)"
if echo $HOST | grep -P "^([0-9]+\.){3}[0-9]+" -q; then
echo $HOST
else
echo $HOST| cut -d . -f 1
fi
}
@superseb
superseb / cleanup.sh
Last active June 19, 2023 10:03
Cleanup host added as custom to Rancher 2.0
#!/bin/sh
# OUTDATED: please refer to the link below for the latest version:
# https://github.com/rancherlabs/support-tools/blob/master/extended-rancher-2-cleanup/extended-cleanup-rancher2.sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico /opt/rke"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@shortjared
shortjared / list.txt
Last active July 19, 2024 21:20
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@edsiper
edsiper / kubernetes_commands.md
Last active July 11, 2024 07:42
Kubernetes Useful Commands
@innovia
innovia / kubernetes_add_service_account_kubeconfig.sh
Last active January 29, 2024 23:00
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi