Skip to content

Instantly share code, notes, and snippets.

View scresante's full-sized avatar

scresante

View GitHub Profile
@scresante
scresante / configure_bridge.sh
Created January 5, 2023 03:06
configure_bridge
#!/bin/bash
# this script will set up a bridge in a libvirt host that has network manager
if [ -z $1 ] || [ -z $2 ] || [[ $1 = -h ]] || [[ $1 = --help ]]; then
echo "Usage: $0 [interface] [activate|deactivate]"
exit 1
fi
IFACE=$1
@scresante
scresante / CaSe.py
Created January 15, 2022 03:30
THIs wIlL MaKe YOuR TeXt fUNKy
#!/usr/bin/python
import random
import subprocess
from itertools import zip_longest
import unicodedata
def make_fullwidth_char(ch):
name = unicodedata.name(ch)
if name[:9] == "FULLWIDTH":
return ch
@scresante
scresante / Youtube_Livestream_Parts_download.py
Last active December 3, 2021 12:08 — forked from cheadrian/Youtube_Livestream_Parts_download.py
Download Youtube Live streamed video from the start or selected time
#With the help of this script you can download parts from the Youtube Video that is live streamed, from start of the stream till the end
import urllib.request
try:
from tqdm import tqdm
except ImportError:
print('consider installing tqdm for a nice progress bar')
#E.G: "https://r4---sn-gqn-p5ns.googlevideo.com/videoplayback?expire=1603041842& ..... 2.20201016.02.00&sq="
#The sound link should contain: &mime=audio in it.
import boto3
import secrets
import sys
def create():
user_data = """#!/bin/sh
yum update -y
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y zsh wireguard-tools"""
@scresante
scresante / gist:e68c849425fd185efad72dfc98f3685b
Created May 30, 2020 04:01
Top 5 2020 AMI providers account IDs
Top 5 2020 AMI providers
"531415883065" openshift
"801119661308" amazon
"979382823631" bitnami
"330183209093" qbol?-hvm
"679593333241" aws-marketplace
@scresante
scresante / OTwomen.txt
Created May 23, 2020 03:46
list of OT women
Abi
Abiah
Abigail
Abihail
Abishag
Abital
Achsah
Adah
Ahlai
Aholibamah
@scresante
scresante / installosc.sh
Created October 7, 2019 04:11
the developer of nfqueue doesn't know what he's doing packaging something like this
#!/bin/sh
cwd=$PWD
# intended use: install oschameleon on centos7
# as root without any bloody care for proper procedures
yum upgrade -y
yum install epel-release -y
yum install wget alien git python-pip gcc -y
pip install gevent
# adapted from https://pypi.org/project/OSfooler-ng/
@scresante
scresante / ##-cpx_automount.rules
Last active May 10, 2019 19:23
automount rule for systemd + udev and CPX boards
KERNEL!="sd[a-z][0-9]", GOTO="cpx_by_sn_automount_end"
ATTRS{vendor}=="Adafruit", ENV{vendor}="$attr{vendor}"
ATTRS{serial}=="*", ENV{serial}="$attr{serial}"
#import FS infos
## this imports ID_FS_UUID
IMPORT{program}="/usr/bin/blkid -o udev -p %N"
IMPORT{program}="/bin/sh -c \"/usr/bin/echo serial=%E{serial} | /usr/bin/cut -c1-12\""
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}-%E{serial}"
ENV{dir_name}=="", ENV{dir_name}="%E{ID_FS_LABEL_FATBOOT}-%E{serial}"
def runningUniq(anArray, compare=lambda x,y: x==y):
""" non-memory efficient linear deduplicator """
retAr = []
for n, elem in enumerate(anArray):
if n == 0:
last = elem
retAr.append(elem)
continue
if compare(elem, last):