Skip to content

Instantly share code, notes, and snippets.

View srikantpatnaik's full-sized avatar

Srikant srikantpatnaik

  • Mumbai
  • 02:30 (UTC -12:00)
View GitHub Profile
@kerren
kerren / install_byobu.sh
Last active October 28, 2023 16:18
Install byobu from source
# Full instructions
# https://blog.entrostat.com/install-byobu-on-any-linux-distro/
BYOBU_VERSION=5.133
set -e
echo "Please make sure you have the following dependencies installed:"
echo " [+] tar"
echo " [+] screen"
@opus-x
opus-x / nabu_eea_debloat.cmd
Last active April 22, 2024 21:37
Debloat and speed-up Xiaomi Pad 5 by disabling apps and limiting apps starting in the background (EU model), Tested and working but to be finetuned.
@echo off
rem usb connection
echo =======================================
echo Starting Android Debug Bridge Daemon...
echo =======================================
2>nul adb kill-server
adb start-server
echo | set /p="Checking for a connected device... "
>nul adb get-state
@P1N2O
P1N2O / README.md
Last active April 29, 2024 01:29
Guide to Compile an Android Kernel with Clang

Android Kernel Compilation Guide

This gist is intended to assist beginners, like myself, in getting started with Android Kernel Compilation. Please note that while I'm sharing my setup and process, this guide may not be entirely accurate, and I welcome suggestions from experienced developers to improve it.

Installing Build Tools

I am on Arch, so I will be using pacman to install the base-devel package group.

sudo pacman -S base-devel

On a Debian based distro, you can use apt and install the build-essential package.

@minlexx
minlexx / create-bootimg.sh
Last active September 15, 2023 19:15
Script to create boot.img for xiaomi-lavender from inside kernel build tree, using initramfs file built by pmbootstrap
#!/bin/bash
set -x
KERNEL=./arch/arm64/boot/Image.gz
KERNEL_DTB=${KERNEL}-dtb
DTB=./arch/arm64/boot/dts/qcom/sdm660-xiaomi-lavender.dtb
INITRD=initramfs-postmarketos-qcom-sdm660
# Optional:
@isomorphisms
isomorphisms / gist:3114ab86960656a729a6b4653001aae2
Created November 27, 2019 06:08
how to pull from docker hub using podman/buildah
On void linux.
Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`.
Change (for me lines 11-12) which say
[registries.search]
registries = []
@rsmn
rsmn / multiple_ssh_setting.md
Last active October 1, 2020 08:09 — forked from jexchan/multiple_ssh_setting.md
How to add Multiple SSH keys to Gitlab and Add Sites from both account to Laravel Forge

Multiple SSH Keys settings for different gitlab account

Example Use Case:

  • Server: Digital Ocean
  • Server Name: serverone
  • First Gitlab Account Username: account1
  • Second Gitlab Account Username: account2

create different public key

@p3t3r67x0
p3t3r67x0 / openssl_commands.md
Last active February 3, 2024 18:53
Some list of openssl commands for check and verify your keys

openssl

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@mathewdgardner
mathewdgardner / docker-save-load-images.sh
Created March 1, 2016 02:55
Save / load compressed docker images
#!/bin/bash
# Save docker images
ds() {
docker images | \
cut -d ' ' -f 1 | \
tail -n +2 | \
xargs -t -n 1 -I {} -P 4 \
sh -c 'docker save {} | bzip2 > $(echo "{}" | sed "s/^.*\///").tar.bz2'
}
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
anonymous
anonymous / setup_kiosk.sh
Created November 6, 2014 17:17
create a kiosk user
#!/bin/bash
# This script
# - creates a user (named below)
# - sets up a union (aufs) filesystem on top of the users immutable home
# - creates a cleanup script (/usr/local/bin/cleanup.sh) that empties the aufs
# layer on login/logout/boot
# - replaces the lightdm config
# - replaces rc.local to run the script
#