Skip to content

Instantly share code, notes, and snippets.

View eramax's full-sized avatar
🎯
Focusing

Ahmed Morsi eramax

🎯
Focusing
View GitHub Profile
@eramax
eramax / values.yml
Created December 20, 2020 16:17
Traefik on Kubernetes
additionalArguments:
- --serverstransport.insecureskipverify
- --providers.file.filename=/data/traefik-config.yaml
- --entrypoints.web.http.redirections.entrypoint.to=:443
- --entrypoints.web.http.redirections.entrypoint.permanent=true
- --entrypoints.websecure.http.tls.certresolver=cloudflare
- --entrypoints.websecure.http.middlewares=headers-default@file
- --certificatesresolvers.cloudflare.acme.dnschallenge.provider=cloudflare
- --certificatesresolvers.cloudflare.acme.email=YOUREMAIL
- --certificatesresolvers.cloudflare.acme.dnschallenge.resolvers=1.1.1.1
@eramax
eramax / Program.cs
Last active July 6, 2021 20:26 — forked from davidfowl/Program.cs
A minimal fully asynchronous C# ASP.NET Core 3.0 application with routing (learn more about ASP.NET Core here https://docs.microsoft.com/en-us/aspnet/core/?view=aspnetcore-3.0)
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Hosting;
public class Program
{
public static void Main(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
@eramax
eramax / README.MD
Created August 7, 2021 21:28 — forked from nzec/README.MD
DeezLoader Offical Page

Thanks to /u/zpoo32 for reporting several issues in this list!

Deemix

  • deemix: just the cli and the library
  • deemix-pyweb: the app with a GUI
  • deemix-server: just the server part of deemix-pyweb
@eramax
eramax / extend-trial-jetbrains-windows.bat
Created September 25, 2021 11:50
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
function getHightlightCoords() {
var pageIndex = PDFViewerApplication.pdfViewer.currentPageNumber - 1;
var page = PDFViewerApplication.pdfViewer.getPageView(pageIndex);
var pageRect = page.canvas.getClientRects()[0];
var selectionRects = window.getSelection().getRangeAt(0).getClientRects();
var viewport = page.viewport;
var selected = selectionRects.map(function (r) {
return viewport.convertToPdfPoint(r.left - pageRect.x, r.top - pageRect.y).concat(
viewport.convertToPdfPoint(r.right - pageRect.x, r.bottom - pageRect.y));
});
@eramax
eramax / my_hello_world_distro.sh
Created January 25, 2023 21:44 — forked from Daniel-Abrecht/my_hello_world_distro.sh
Shellscript to build the most minimalistic linux live CD which just starts /sbin/init from the CD root directory and outputs "Hello World!"
#!/bin/bash
# Vorhandensein der Programme prüfen
MKISOFS=( $(which genisoimage mkisofs) )
if ! [ -x "$MKISOFS" ]; then echo "genisoimage aka mkisofs is missing"; exit 1; fi
if ! [ -x "$(which gcc)" ]; then echo "gcc is missing"; exit 1; fi
if ! [ -x "$(which nasm)" ]; then echo "nasm is missing"; exit 1; fi
if ! [ -x "$(which cpio)" ]; then echo "cpio is missing"; exit 1; fi
if ! [ -x "$(which tar)" ]; then echo "tar is missing"; exit 1; fi
@eramax
eramax / readme.md
Created February 5, 2023 22:05 — forked from xanderificnl/readme.md
alpine + k3s

/etc/update-extlinux.conf

default_kernel_opts="nomodeset quiet rootfstype=ext4 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory consoleblank=120"

update-extlinux && reboot

Install k3s

curl -sfL https://get.k3s.io | INSTALL_k3S_EXEC='--disable servicelb --no-deploy traefik --flannel-backend=none --disable-network-policy' sh -
@eramax
eramax / install.sh
Created February 5, 2023 22:05 — forked from iul1an/install.sh
install k3s with cilium CNI
#!/bin/bash
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='--flannel-backend=none --no-flannel' sh -s - \
--disable-network-policy \
--disable "servicelb" \
--disable "traefik" \
--disable "metrics-server"
sudo cat /etc/rancher/k3s/k3s.yaml > ~/.kube/config
kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.7/install/kubernetes/quick-install.yaml
@eramax
eramax / install.sh
Created February 5, 2023 22:05 — forked from hydrz/install.sh
High Availability K3s and Kube-vip with Cilium
#!/bin/sh
set -e
set -o noglob
# Usage: ./install.sh [options]
#
# Example:
# Installing on first master node run:
# ./install --num 3 --vip 192.168.2.10 --iface eth0
# Installing on other master nodes run:
@eramax
eramax / gist:fd0950a5f54a28058f8318340242e895
Created October 14, 2023 00:29 — forked from chrisdone/gist:02e165a0004be33734ac2334f215380e
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel