Skip to content

Instantly share code, notes, and snippets.

@fursiol0800
fursiol0800 / pycurses.py
Created November 13, 2023 22:21 — forked from claymcleod/pycurses.py
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
KeepAlive(ColabWinTitle, Interval){
Loop
{
Sleep, 1000 * 3
if WinExist(ColabWinTitle)
{
WinActivate ; Automatically uses the window found above.
WinMaximize ; same
Sleep, 2000
MouseClick, left, 1750, 250, 1, 30
InputBox, ColabFileName, Colab Keep Alive Script, Enter the Google Colab filename
ColabWinTitle := ColabFileName . " - Colaboratory - Google Chrome"
if WinExist(ColabWinTitle){
WinActivate
InputBox, Interval, Keep Alive : %ColabWinTitle%, Enter an interval (in minutes) to emulate mouse and keyboard behaviour :
if Interval is not integer
{
MsgBox, , Halt : Bad Type, Enter an Integer for the Interval
Return
}
@fursiol0800
fursiol0800 / server.py
Created August 26, 2024 08:19 — forked from mdonkers/server.py
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@fursiol0800
fursiol0800 / socat-forward-tcp.sh
Created August 28, 2024 17:51 — forked from tuxfight3r/socat-forward-tcp.sh
Tunnel TCP traffic via socat. #socat
#!/bin/bash
PUBLIC_IP4_IFACE=eth2
LISTEN_IFACE=${PUBLIC_IP4_IFACE}
listen_address=$(ip -f inet addr show dev ${LISTEN_IFACE} | grep -Po 'inet \K[\d.]+')
listen_port=${1}
target_host=${2}
target_port=${3}
@fursiol0800
fursiol0800 / clone.bash
Created August 31, 2024 07:15 — forked from milanboers/clone.bash
Clone all repositories of a Github user
curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone
@fursiol0800
fursiol0800 / socket.c
Created September 1, 2024 06:45 — forked from nolim1t/socket.c
HTTP Request in C using low level write to socket functionality
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <netinet/tcp.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netinet/in.h>
@fursiol0800
fursiol0800 / jq-cheetsheet.md
Created September 26, 2024 00:59 — forked from olih/jq-cheetsheet.md
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@fursiol0800
fursiol0800 / Arch_Linux_Install_Guide.md
Created November 8, 2024 20:54 — forked from mihirchanduka/Arch_Linux_Install_Guide.md
Arch Install Guide with BTRFS, Full Disk Encryption and Encrypted Swap Partition

Arch Linux Installation Guide


Guide to install Arch Linux on an EFI System. Includes these features:

  • Full Disk Encryption with LUKS
  • BTRFS with @ and @home subvolumes
  • Timeshift Backups
  • Encrypted Swap Partition
  • rEFInd bootloader
  • SDDM display manager
  • KDE Plasma desktop environment