Skip to content

Instantly share code, notes, and snippets.

@refabr1k
refabr1k / iterm2-solarized.md
Created March 8, 2020 04:44 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@refabr1k
refabr1k / gist:1a70cbc5f0c77a558462495e3fb96555
Created April 8, 2020 03:44
Python GET and POST request using json parameters
import requests
import json
for x in range(0,10):
# GET captcha id and answer
r = requests.get("http://127.0.0.1:3000/rest/captcha/")
data = r.json()
@refabr1k
refabr1k / DhcpReporter
Last active February 13, 2024 23:34
Mikrotik dhcp lease notification using telegrambot
:local newanimal [("lease status = ".[$leaseBound]." | ".[$"lease-hostname"]." | ".[$leaseActIP]." | ".[$leaseActMAC])]
/tool fetch "https://api.telegram.org/botAPIKEY/sendmessage\?chat_id=CHATID&text=Movement in the animal farm!%0a $newanimal" keep-result=no;
@refabr1k
refabr1k / WANReporter
Created August 30, 2020 06:30
Mikrotik get public IP and send to telegram bot
{
/tool fetch url="http://myip.dnsomatic.com/" mode=http dst-path=mypublicip.txt
local ip [file get mypublicip.txt contents ]
put $ip
/tool fetch "https://api.telegram.org/<BOTAPI>/sendmessage\?chat_id=<CHATID>&text=Wan IP: $ip" keep-result=no;
}
@refabr1k
refabr1k / b43-old-mbp.md
Last active August 22, 2025 12:37
b43 wireless driver for old mbp
# install
sudo apt install -y conky
# foreground conky
$ export NETWORK_INTERFACE=eth0
$ cat <<EOF > ~/.conkyrc
conky.config = {
use_spacer = 'left',
pad_percents = 3,
background = true,
@refabr1k
refabr1k / blindsqli.py
Created July 30, 2021 15:42
Blind sql injection using true/false statements (mysql)
#!/usr/bin/python
import string, os, requests
allchars = string.ascii_letters
found = False
quit = False
dumpstr = ""
index = 1
table="database()"
@refabr1k
refabr1k / ssh for git.md
Last active August 3, 2021 10:52 — forked from developius/README.md
Setup SSH keys for use with GitHub/GitLab/BitBucket etc
@refabr1k
refabr1k / remove_xorg.conf
Created August 7, 2021 09:32
popos - remove nvida conf issue when primary monitor doesnt show up after using dual monitor
sudo rm -v /etc/X11/xorg.conf*
@refabr1k
refabr1k / setting up yubikey u2f.sh
Created August 20, 2021 17:14
setting up yubikey u2f
# note: leave a seperate sudo terminal running and test if works eg. with sudo first
sudo apt update
sudo apt install libpam-u2f pamu2fcfg
mkdir -p ~/.config/Yubico
pamu2fcfg > ~/.config/Yubico/u2f_keys
# touch yubikey when flashing to associate
# edit /etc/pam.d/sud