Skip to content

Instantly share code, notes, and snippets.

@nukeador
nukeador / Teambox v3 installation on Ubuntu Server 10.04
Last active December 16, 2015 05:19
Teambox v3 installation on Ubuntu Server 10.04
$ sudo apt-get install \
build-essential ruby ruby-dev irb libmysqlclient15-dev sqlite3 libsqlite3-dev \
libcurl4-openssl-dev libopenssl-ruby libpcre3-dev libxml2-dev libxslt-dev \
libreadline5-dev apache2 apache2-prefork-dev libapr1-dev imagemagick libpq-dev \
libmysql-ruby libmysqlclient-dev
$ sudo aptitude install ruby
$ sudo apt-add-repository ppa:maco.m/ruby

Keybase proof

I hereby claim:

  • I am nukeador on github.
  • I am nukeador (https://keybase.io/nukeador) on keybase.
  • I have a public key whose fingerprint is E5FF 384E C4AA 2E58 E6DC 9CD2 17E0 ABDB C6F4 23E6

To claim this, I am signing this object:

@nukeador
nukeador / fxaddon-report.md
Last active May 4, 2018 23:53
Fetch locales from a given list of Firefox addon urls
# You need two csv files with the links to the vendor wav files
# vendor1.csv should have urls in the 5th column
# vendor2.csv should have urls in the 13th column
rm vendor1.audios.txt
rm vendor2.audios.txt
mkdir -p audios
awk -F "\"*,\"*" '{print $5}' vendor1.csv | shuf -n20 >> vendor1.audios.txt
@nukeador
nukeador / vpn-firewall.sh
Last active December 19, 2020 22:42
Connect to VPN and force all traffic to travel using it. Will monitor and reconnect if VPN drops.
#!/bin/bash
# Your VPN ip address, you can use: host yourvpnaddress.com
VPN_IP="X.X.X.X"
# Your VPN name on Network Manager, to list all connections you can use: nmcli con
VPN_NAME="your.vpn.name"
# Your network device, usually wlan0 for wifi and eth0 for cable, check with: ifconfig
NW_DEVICE="wlan0"
# Your local network range, change if different
LOCAL_NW="192.168.0.0/16"
@nukeador
nukeador / vpn-off.sh
Last active December 19, 2020 22:43
Disconnects from VPN on Linux, killing apps first and reseting the firewall
#!/bin/bash
# Your VPN name on Network Manager, to list all connections you can use: nmcli con
VPN_NAME="your.vpn.name"
# List of apps you want to kill before disconnecting from the VPN, if you don't kill them, they will leak traffic
KILL_APPS="firefox thunderbird transmission-gtk"
# Killing apps
killall $KILL_APPS
@nukeador
nukeador / bulk-ban.py
Last active September 21, 2022 17:42
Bulk-banning a user on multiple rooms from a text file using matrix-commander
#!/usr/bin/env python3
"""
Usage bulk-ban.py room-list.txt @userid:server.com
Please set the notice_room variable to the room your want to notify when
banning an user.
You will need matrix-commander installed configured before
https://github.com/8go/matrix-commander/
"""
@nukeador
nukeador / chatgpt-bot-telegram.py
Last active December 9, 2022 14:28
Este script ha sido creado 100% por ChatGPT, sirve para crear un bot en telegram que conecte a la API de ChatGPT para hablar con el bot (también responde en grupos a los usuarios autorizados). Sutituye en el código XXXX por tu api de openai, tu token de telegram y tu user_id de telegram https://twitter.com/nukeador/status/1599502803877203979 Pue…
# Puedes ver una versión más avanzada de este bot en https://github.com/nukeador/chatgpt-tegram-bot
# Requisitos:
# 1. Tener una cuenta de Telegram y haber creado un bot de Telegram utilizando el BotFather.
# 2. Tener una cuenta de OpenAI y haber obtenido una clave de acceso a la API de ChatGPT.
# 3. Tener instalado Python 3 en el sistema.
# 4. Instalar los módulos de python `pyTelegramBotAPI` y `openai` utilizando pip.
# 5. Configurar el token del bot de Telegram y la clave de acceso a la API de ChatGPT en el script.
# 6. Ejecutar el script utilizando una conexión a Internet activa.
@nukeador
nukeador / get_sms.py
Created January 4, 2023 18:39
Script that retrieves the sender and message of the last SMS received by a randomly selected phone number from a given country code
import requests
import random
from bs4 import BeautifulSoup
# Make sure you install BeautifulSoup first
# pip3 install beautifulsoup4
# Define a function to get a list of phone numbers in a given country
def get_numbers(country):
# Make a GET request to the website to get the HTML content
@nukeador
nukeador / phpbb2discourse.md
Last active November 13, 2023 17:19
phpBB to Discourse migration