Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
someone please fucking hire me preferably in a different country where i can go

Keira T. researcx

💭
someone please fucking hire me preferably in a different country where i can go
View GitHub Profile
@researcx
researcx / githubrepos.py
Last active Sep 27, 2022
periodically make a html page of your github repos (requires github cli tools (gh command))
View githubrepos.py
import json, humanize, os, html
from datetime import datetime, timedelta
file = '/home/keira/Repositories/Public/github.html'
github_json_file = '/home/keira/Resources/github.json'
# cron every 30 minutes:
# */30 * * * * /usr/bin/gh repo list researcx -L 400 --visibility public --json name,owner,pushedAt,isFork,diskUsage,description > /home/keira/Resources/github.json
# */31 * * * * /usr/bin/python3 /home/keira/Scripts/githubrepos.py
View sysctl2.conf
vm.vfs_cache_pressure = 500
vm.swappiness = 90
vm.dirty_background_ratio = 1
vm.dirty_ratio = 50
vm.dirty_background_bytes = 4194304
vm.dirty_bytes = 4194304
net.core.netdev_max_backlog = 16384
net.core.somaxconn = 8192
net.core.rmem_default = 1048576
net.core.rmem_max = 16777216
View sysctl1.conf
vm.swappiness = 1
vm.dirty_background_ratio = 3
vm.dirty_ratio = 40
vm.dirty_background_bytes = 4194304
vm.dirty_bytes = 4194304
vm.vfs_cache_pressure = 50
net.core.netdev_max_backlog = 16384
net.core.somaxconn = 8192
net.core.rmem_default = 1048576
net.core.rmem_max = 16777216
@researcx
researcx / angristan-openvpn-easy-renew.sh
Last active Sep 13, 2022
easy renew angristan openvpn certs
View angristan-openvpn-easy-renew.sh
#!/bin/bash
# Commands to renew certificates for angristan's openvpn-install
# https://github.com/angristan/openvpn-install
# CREDIT: https://github.com/angristan/openvpn-install/issues/1002#issuecomment-1229525488
# https://github.com/kg6uyz
NAME=$(cat /etc/openvpn/easy-rsa/SERVER_NAME_GENERATED)
@researcx
researcx / pydirlist
Created Sep 13, 2022
pydirlist service file for openrc
View pydirlist
#!/sbin/openrc-run
depend() {
need net
}
srv="/path/to/pydirlist/"
command="/bin/sh /path/to/pydirlist/run.sh"
command_args=""
command_user="myuser:mygroup"
@researcx
researcx / pydirlist.service
Created Sep 13, 2022
pydirlist service file for systemd
View pydirlist.service
[Unit]
Description=pydirlist
After=network.target
[Service]
User=myuser
WorkingDirectory=/path/to/pydirlist
ExecStart=bash /path/to/pydirlist/run.sh
Restart=always
View config.fish
function fish_greeting
echo ""
neofetch
end
set LC_ALL en_GB.UTF-8
set LANG en_GB.UTF-8
set LANGUAGE en_GB.UTF-8
alias psg="ps aux | grep"
@researcx
researcx / discord_export_friends.py
Created Apr 26, 2022
export discord tags & permanent userids w/ discord.py
View discord_export_friends.py
#!/usr/bin/python3
import discord
token = ("")
class ExportFriends(discord.Client):
async def on_connect(self):
friendslist = client.user.friends
for user in friendslist:
try:
print(user.name+"#"+user.discriminator + " ("+str(user.id)+")")
@researcx
researcx / check_time_weather_condition.sh
Created Apr 15, 2022
check weather and time conditions
View check_time_weather_condition.sh
#!/bin/bash
LOCATION="Hampshire"
CONDITION=`curl -s wttr.in/$LOCATION?format=%C`
SUNSET=`curl -s wttr.in/$LOCATION?format=%s`
SUNRISE=`curl -s wttr.in/$LOCATION?format=%S`
TIME=`date "+%H:%M:%S"`
sunset_time=$(date -d $SUNSET +%s)
@researcx
researcx / check_xmrig.sh
Created Apr 14, 2022
check if xmrig is running
View check_xmrig.sh
#!/bin/bash
PROCESS=`ps -eaf | grep xmrig | grep -v grep`
if [ "$PROCESS" == '' ]
then
/home/monero/xmrig -B
else
echo "xmrig running"
fi