Skip to content

Instantly share code, notes, and snippets.

View eramax's full-sized avatar
🎯
Focusing

Ahmed Morsi eramax

🎯
Focusing
View GitHub Profile
@khusseini
khusseini / README.md
Last active August 25, 2022 04:04
Adding traefik to LKS

Setup Traefik 2.2 with Let's Encrypt On LKE

If you searched for this article I chances are you know what LKE, Traefik and Let's Encrypt are, else here is a quick primer:

What is LKE?

"The Linode Kubernetes Engine (LKE) is a fully-managed container orchestration engine for deploying and managing containerized applications and workloads.". For more information please have a look at "Deploy and manage a cluster with Linode Kubernetes Engine"

@srebalaji
srebalaji / git-hard-delete
Last active October 10, 2023 13:10
Examples of git custom command
#!/bin/sh
branch=$1
if [ ! -z "$1" ]
then
git branch -D $branch
git push -d origin $branch
else
echo "Branch name is not specified"
@hangst
hangst / compile_kernel.sh
Last active October 21, 2023 14:40
Compile mainline Linux kernel and boot on Amlogic Meson S905 through USB
# linux-meson.com/doku.php#howto
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- Image dtbs
mkimage -A arm64 -O linux -T kernel -C none -a 0x1080000 -e 0x1080000 -n linux-next -d arch/arm64/boot/Image ../uImage
cp arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dtb ../uImage BOOT_PARTITION
# ROOTFS_PARTITION can be any arm64 Linux root filesystem
@henriqueutsch
henriqueutsch / installscript.sh
Last active July 10, 2020 14:16
manjaro install GTX 1050Ti
https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-manjaro-18-linux
https://github.com/dglt1/optimus-switch-gdm
https://forum.manjaro.org/t/hdmi-monitor-not-working/94301/2
https://www.unixmen.com/install-oh-zsh-ubuntu-arch-linux-fedora/
https://starship.rs/guide/#%F0%9F%9A%80-installation
https://gist.github.com/tomgco/d08fcf551b5e3157173d2f0701b50b46
https://wiki.archlinux.org/index.php/VirtualBox
#!/bin/bash
#Server hardening script for cPanel servers
# Make sure only root can run this script
if [ "$(id -u)" != "0" ]; then
echo -e "\e[93m This script must be run as root \e[0m"
exit 1
fi
echo -e "\e[1;36;40m Server Hardening initiated \e[0m"
@billti
billti / arm64-on-Win10.md
Last active March 13, 2025 20:04
ARM64 Linux on Win10

Below are the steps to get an ARM64 version of Ubuntu running in the QEMU emulator on Windows 10.

Install QEMU

Install for Windows from https://qemu.weilnetz.de/w64/ (I used qemu-w64-setup-20181211.exe)

Put C:\Program Files\qemu on your PATH, and run the below to check it's working (which will list out the CPUs the AArch64 emulator can emulate):

qemu-system-aarch64 -M virt -cpu help
@Antaris
Antaris / ServiceProviderJobFactory.cs
Created May 21, 2019 19:57
A Quartz.NET job factory using Microsoft.Extensions.DependencyInjection and scoped services
using System;
using System.Collections.Generic;
using Microsoft.Extensions.DependencyInjection;
using Quartz;
using Quartz.Spi;
public class ServiceProviderJobFactory : IJobFactory
{
private readonly IServiceProvider _rootServiceProvider;
@mnikn
mnikn / router.js
Last active April 18, 2020 05:19
[router] a simple web router #utils
// the router should be sigleton
class Router {
constructor(routeMap) {
this._routeMap = routeMap;
this.bindEvent();
}
init(url) {
let fn = this._routeMap[url];
window.history.replaceState({url: url}, '', url);
@Machy8
Machy8 / readme.md
Last active August 6, 2023 13:38
Start Kubernetes proxy server automatically
  1. Create an empty file and paste the content bellow into it /lib/systemd/system/kubectlproxy.service
[Unit]
Description=kubectl proxy 8080
After=network.target

[Service]
User=root
ExecStart=/bin/bash -c "/usr/bin/kubectl proxy --address=127.0.0.1 --port=8080"
@AnnoyingTechnology
AnnoyingTechnology / lenovo_legion_y530_linux_compatibility_issues_fix.md
Last active August 2, 2024 16:55
Lenovo Legion Y530 Linux issues and solutions for wifi and touchpad mostly (Debian & Ubuntu)

Intel i7-8750H nVidia GTX 1050 Ti

Summary of my findings (Please comment if you can get further than me) :

edit: 06/2019 guys in the comments have found workarounds and new solutions !

Most importantly : Lenovo refuses to provide any kind of support for their product on Linux, even though the computer is sold without an OS

Ubuntu 18.04