Skip to content

Instantly share code, notes, and snippets.

View Deadlyelder's full-sized avatar

Sankalp Deadlyelder

View GitHub Profile
curl -s https://ngrok-agent.s3.amazonaws.com/ngrok.asc | sudo tee /etc/apt/trusted.gpg.d/ngrok.asc >/dev/null && echo "deb https://ngrok-agent.s3.amazonaws.com buster main" | sudo tee /etc/apt/sources.list.d/ngrok.list && sudo apt update && sudo apt install ngrok
@Deadlyelder
Deadlyelder / makev2.sh
Last active October 3, 2023 11:58
attempt three
#!/bin/bash
# remove virtual consoles
if [ -e "/etc/X11/xorg.conf" ]; then
mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup
fi
cat > /etc/X11/xorg.conf << EOF
Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection
@Deadlyelder
Deadlyelder / makeit.sh
Last active October 16, 2023 08:07
v1 script for terminal
#!/bin/sh
# ROCKY.sh
#
#
# Created by Meow on 16/10/2023.
#
useradd -m kiosk
passwd -d kiosk
resetntinf () {
echo "It will clean up the route tables for connectivity issues";
for i in $(ifconfig | egrep -o "^[a-z].+\d{1}:" | sed 's/://');
do
sudo ifconfig "$i" down;
done;
sudo route -n flush;
for i in $(ifconfig | egrep -o "^[a-z].+\d{1}:" | sed 's/://');
do
sudo ifconfig "$i" up;
names = ['baby', 'mommy', 'daddy', 'gramdma', 'grandpa', 'Let\'s go hunt']
for name in names:
for i in range(3):
if name == names[5]:
print(f'{name},'+ ' doo '*4)
else:
print(f'{name.title()} shark,'+ ' doo'*4)
if name == names[5]:
print(name)
@Deadlyelder
Deadlyelder / convert.sh
Created June 30, 2020 19:27
Academic convert script for annoying papers from DVI, PS and gzip to PDF
#!/bin/sh
# In the perfect world, all academic papers
# are in standards-compliant PDF with proper metadata.
# In practice they come in all sizes and shapes:
# PostScript, DVI, or gzipped versions of those.
# This script homogenizes a directory with papers
# by converting them all to PDFs
#
@Deadlyelder
Deadlyelder / lightning-txs.md
Created June 23, 2020 18:16
Lightning transactions: from Zero to Hero
@Deadlyelder
Deadlyelder / est
Created November 29, 2019 12:58
test
t
import subprocess
import re
from tornado import gen, web
from notebook.base.handlers import APIHandler
import psutil
KERNEL_REGEX = re.compile(r'.+kernel-(.+)\.json')
PID_REGEX = re.compile(r'(\d+).+')
@Deadlyelder
Deadlyelder / indent_correct.md
Created June 27, 2019 12:12
Dirty script to clean python indents

Quickyl correct the indentation issues in a given python file

perl -i.bak -pe "s/\t/' 'x(8-pos()%8)/eg" filename.py