Skip to content

Instantly share code, notes, and snippets.

@Bsebring
Bsebring / abuseipdb_block.py
Last active February 14, 2024 12:37
Python implementation of csf integration
#!/usr/bin/env python
import requests
import json
import sys
# Defining the api-endpoint
url = 'https://api.abuseipdb.com/api/v2/report'
ports = sys.argv[2]
inOut = sys.argv[4]
@plembo
plembo / RcloneMountOneDrive.md
Last active June 20, 2024 15:14
Rclone mount onedrive

Using rclone to mount OneDrive on Linux

Introduction

Yes. Use rclone to mount OneDrive to a folder in your home directory on Linux. "How to Mount OneDrive In Linux Using Rclone (Supports Business and Personal Accounts". Linux Uprising, 17 March 2020, https://www.linuxuprising.com/2018/07/how-to-mount-onedrive-in-linux-using.html.

I really like this solution. The availability of 1 Gb/s bandwidth (thank you, Google Fiber!) at home has made the difference for me. Although I currently have this set up on both my personal desktop and laptop, it obviously doesn't work as well outside the high bandwidth envelope of my home network.

Rclone is my weapon of choice because it has proven itself both stable and performant over the years. It also has many options to improve both, and the doc for rclone mount is excellent.

Procedure

@holmberd
holmberd / linux-kill-pts.md
Last active July 13, 2024 18:38
Kill tty/pts sessions in Linux

Kill user tty/pts sessions in Linux

Commands

  • w: show who is logged on and what they are doing
  • who: show who is logged on
  • tty: show current users pseudo terminal
  • ps -ft pts/1: get process id for the pseudo terminal
  • pkill: signal process based on name and other attributes
@zulhfreelancer
zulhfreelancer / install-docker.md
Last active March 22, 2025 14:30
Install Docker oneliner script

Just install Docker

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Install Docker and Rancher Server

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server

@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active March 25, 2025 11:44 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@lichti
lichti / letsencrypt-proxmox.md
Last active September 12, 2022 20:14
Proxmox with letsencrypt ssl
git clone https://github.com/certbot/certbot /opt/letsencrypt
ln -s /opt/letsencrypt/certbot-auto /usr/bin/certbot
certbot certonly --expand --agree-tos --text --non-interactive \
 --standalone \
@davidalves1
davidalves1 / desfazendo-push.md
Last active October 7, 2024 14:19
Desfazendo um git push

Desfazendo um git push

Não é possível desfazer um push diretamente, como é feito com o commit utilizando o comando $ git reset --soft|mixed|hard hash-do-penultimo-commit

Para desfazer um push são necessários 3 passos:

  1. Utilizar o comando $ git reset --mixed HEAD~1 e em seguida utilizar o comando $ git stash (se preferir pode usar a opção -m "revertendo o push blablabla" para salvar o stash com um contexto do que foi feito
  2. Utilizar o comando $ git revert HEAD~0
  3. Utilizar o comando $ git stash apply
  4. Utilizar o comando $ git push origin sua-branch -f
@ManfMert
ManfMert / Konsole output
Last active January 19, 2017 18:24
Extended version of sshfilter.sh to recognized private ip addresses and realy unknown ip addresses
/var/log/messages
Dec 12 16:03:39 bananapi logger: DENY sshd connection from 113.108.21.16 (CN)
Dec 12 16:12:59 bananapi logger: DENY sshd connection from 185.110.132.202 (IP Address not found)
Dec 12 16:20:12 bananapi logger: DENY sshd connection from 121.18.238.98 (CN)
Dec 12 16:24:57 bananapi logger: DENY sshd connection from 185.110.132.202 (IP Address not found)
Dec 12 16:26:20 bananapi logger: DENY sshd connection from 121.18.238.114 (CN)
Dec 12 16:29:10 bananapi logger: DENY sshd connection from 221.194.44.195 (CN)
Dec 12 16:30:55 bananapi logger: DENY sshd connection from 221.194.47.249 (CN)
Dec 12 16:37:06 bananapi logger: DENY sshd connection from 185.110.132.202 (IP Address not found)
@tbreuss
tbreuss / dnsbl.php
Last active October 30, 2024 12:26
IP Blacklist Check Script - This is a simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once.
<?php // Simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once. ?>
<html>
<head>
<title>DNSBL Lookup Tool - IP Blacklist Check Script</title>
</head>
<body>
<h2>IP Blacklist Check Script</h2>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="text" value="" name="ip"/>
<input type="submit" value="LOOKUP"/>
// ==UserScript==
// @name BlockBlockAdBlock
// @namespace http://github.com/anka-213
// @version 0.1.1
// @description Block the BlockAdBlock script
// @author Andreas Källberg
// @match http://blockadblock.com/*
// @grant none
// @run-at document-start
// ==/UserScript==