Skip to content

Instantly share code, notes, and snippets.

View drushadrusha's full-sized avatar
🌴
On vacation forever

drushadrusha drushadrusha

🌴
On vacation forever
View GitHub Profile
@drushadrusha
drushadrusha / bb.go
Created August 14, 2019 15:53
Big Brother Telegram Notifications
View bb.go
package main
import (
"log"
"net/http"
"strings"
"time"
"github.com/PuerkitoBio/goquery"
)
View picojournal.sh
#!/bin/bash
CYAN='\033[1;36m'
NC='\033[0m'
cd /Users/drusha/journal/
if [ "$1" = 'ls' ]; then
for filename in *; do
echo " "
@drushadrusha
drushadrusha / virt-manager.sh
Created September 1, 2022 13:56
Run virt-manager in browser via GTK Broadway
View virt-manager.sh
#!/bin/bash
nohup /usr/bin/broadwayd :5 &> /var/log/broadway.log &
export GDK_BACKEND=broadway
export BROADWAY_DISPLAY=:5
virt-manager &
# virt-manager will be available at localhost:8085
@drushadrusha
drushadrusha / mac-vendor.txt
Created January 1, 2023 15:30 — forked from aallan/mac-vendor.txt
List of MAC addresses with vendors identities
View mac-vendor.txt
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?
@drushadrusha
drushadrusha / systemd_telegram
Created January 27, 2023 06:28
systemd service notifications in telegram without fucking python scripts and other trash
View systemd_telegram
ExecStartPost=/bin/bash -c "SERVICE_NAME=%n;curl \"https://api.telegram.org/botTOKEN/sendMessage?chat_id=20515652&text=✅ Service $SERVICE_NAME started on $HOSTNAME\""
ExecStopPost=/bin/bash -c "SERVICE_NAME=%n;curl \"https://api.telegram.org/botTOKEN/sendMessage?chat_id=20515652&text=❌ Service $SERVICE_NAME stopped on $HOSTNAME\""
@drushadrusha
drushadrusha / Half Life on Mac M1.sh
Last active March 3, 2023 17:32
How to build and run Half-Life 1 on M1 natively.
View Half Life on Mac M1.sh
##
## Guide to build and run half-life 1 on M1 processor
##
##
## This is not a script.
## This may be not be accurate.
## Execute all commands by yourself and only if you are understand their meaning.
##
@drushadrusha
drushadrusha / wireguard.sh
Last active March 3, 2023 17:40
How to make Wireguard VPN input and output traffic on different interfaces.
View wireguard.sh
## This will work with installation made by this script.
## https://github.com/angristan/wireguard-install
echo "100 wg" >> /etc/iproute2/rt_tables ## Create new routing table
ip rule add from 10.66.66.1/24 table wg ## Send all traffic from Wireguard network to wg routing table
ip route add default via 192.168.1.1 dev ens7 table wg ## Set default gateway for wg routing table
iptables -t nat -A POSTROUTING -o ens7 -s 10.66.66.1/24 -j MASQUERADE ## Make it working with Wireguard NAT
## Also you could try something like this.
View airtag_detection.py
"""
code from
https://www.reddit.com/r/raspberry_pi/comments/szgawv/using_a_raspberry_pi_to_continuously_scan_for/
Scan for iBeacons.
Copyright (c) 2022 Koen Vervloesem
SPDX-License-Identifier: MIT
"""
import asyncio
@drushadrusha
drushadrusha / gemini.php
Created July 7, 2023 17:15
PHP Gemini Client
View gemini.php
<?php
// This is a simple PHP script that can be used to fetch a Gemini URL and return the contents.
// Example usage:
try {
echo gemini_get_contents('gemini://gemini.circumlunar.space');
} catch(Exception $e) {
echo $e->getMessage();