Skip to content

Instantly share code, notes, and snippets.

View 0x1d107's full-sized avatar

Oxidiot 0x1d107

View GitHub Profile
if [ -f /run/.containerenv ]
then
function containername() {
. /run/.containerenv
echo $name
}
export TMUX_TMPDIR=/tmp/$(containername)-tmux/
mkdir -p $TMUX_TMPDIR
unset -f containername
fi
from math import *
HEADER = """
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
"""
[Unit]
Description=DPI-evading SOCKS proxy
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
DynamicUser=true
ExecStart=/usr/local/bin/ciadpi -p 1085 -s 2
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
@0x1d107
0x1d107 / mts-music.py
Last active February 27, 2025 17:17
MTS music downloader. Hashing algorithm was taken from https://github.com/llistochek/yandex-music-downloader
#!/bin/env python
import lxml.html as lh
import urllib.request as rq
import json
import hashlib
from tqdm import tqdm
import sys, os
MTS_MUSIC = "https://music.mts.ru"
"""
@0x1d107
0x1d107 / lemonade.sh
Last active October 3, 2023 11:46
lemonbar script
#!/bin/bash
export MPD_HOST=~/.mpd/socket
function clock {
date +"%H:%M"
}
function desktop {
printf "[%4s]" "$(bspc query -D -d focused --names)"
}
function layout {
xkb-switch -p
@0x1d107
0x1d107 / requirements.txt
Last active September 4, 2023 03:07
USATU schedule parser
beautifulsoup4==4.11.1
certifi==2022.12.7
charset-normalizer==3.0.1
icalendar==5.0.4
idna==3.4
lxml==4.9.2
python-dateutil==2.8.2
pytz==2022.7.1
requests==2.28.2
six==1.16.0
#!/bin/bash
SERVER_CONF='/etc/wireguard/wg0.conf'
SERVER_PUBLIC_KEY="$(grep PrivateKey $SERVER_CONF |cut -d= -f2-|tr -d '[:blank:]'|wg pubkey)"
SERVER_ENDPOINT= example.com
CLIENT_IP="10.0.0.$1"
CONFNAME=$(basename "$SERVER_CONF")
IFNAME=${CONFNAME%.conf}
CLIENT_PRIVATE_KEY="$(wg genkey)"
CLIENT_PUBLIC_KEY="$(echo -n $CLIENT_PRIVATE_KEY| wg pubkey)"
@0x1d107
0x1d107 / gismeteo.sh
Last active September 28, 2023 13:59
gismeteo cli
#!/bin/bash
URL_CACHE="$HOME/.cache/gismeteo"
if [ "$#" -eq 0 ] && [ -r "$URL_CACHE" ]
then
xargs curl -Ls < "$URL_CACHE" |xml sel -t -m '/document/GetHHForecastResult' -v '@cityName' -o ', ' -v '@country_name' -n -t -m '//HHForecast|//HHWeather' -v 'time' -o ' ' -v 't' -o '°C ' -v 'fullDesc' -n
exit;
fi
ENDPOINT="http://c31b3236.services.gismeteo.ru/inform-service"
HASH=$(curl -sL "$ENDPOINT/register/?id=13371" |xml sel -t -v '/document/data/hash')
URL="$ENDPOINT/$HASH"
diff --git a/launcher/ui/pages/global/AccountListPage.cpp b/launcher/ui/pages/global/AccountListPage.cpp
index 278f45c4..0ca0de7d 100644
--- a/launcher/ui/pages/global/AccountListPage.cpp
+++ b/launcher/ui/pages/global/AccountListPage.cpp
@@ -198,7 +198,7 @@ void AccountListPage::on_actionAddOffline_triggered()
"If you have lost your account you can contact Microsoft for support."
)
);
- return;
+ //return;
@0x1d107
0x1d107 / nexus.sh
Created June 17, 2023 10:31
Nex protocol browser in bash
URL='nex.nightfall.city/'
LINK=/
while [ -n "$LINK" ]
do
HOST=${URL%%/*}
QUERY=${URL#*/}
PAGE=$(mktemp nexpage.XXXX.txt)
echo /$QUERY |nc $HOST 1900 > $PAGE
clear
echo "=> nex://$URL <="