Skip to content

Instantly share code, notes, and snippets.

@jagrosh
jagrosh / Growing A Discord Server.md
Last active April 17, 2025 18:18
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

#!/usr/bin/python3
"""
#------------------------------------------------------------------------------------------------
#-- Movie Tag Updater for Radarr
#--------------------------------------------------------------------------------------------------
# Program : Radarr_tagarr
# To Complie : n/a
#
# Purpose : Add tags and profiles to radarr movies. Tags are retreived from Radarr.
# Say Y to add a tag. N to skip a tag. N for all tags will remove all tags.
@djotto
djotto / mp4.sh
Created May 20, 2017 12:33 — forked from anonymous/mp4.sh
Merge multiple mp4 files as chapters
#! /usr/bin/env bash
####################################################
# Required Libraries
#
# library name | commands used | verified version
# ------------------------------------------------
# ffmpeg | ffmpeg/ffprobe | 3.1.4 3.2
# gpac | mp4box | 0.6.1
# mp4v2 | mp4chaps | 2.0.0
@koenrh
koenrh / gcp-gpu-vm-hashcat.md
Last active November 24, 2024 21:49
Running Hashcat on Google Cloud's new GPU-based VMs

Running Hashcat on Google Cloud's GPU-based VMs

In February 2017, Google announced the availability GPU-based VMs. I spun up a few of these instances, and ran some benchmarks. Along the way, I wrote down the steps taken to provision these VM instances, and install relevant drivers.

Update April 2019: Updated instructions to use instances with the Tesla T4 GPUs.

anonymous
anonymous / motd.tcl
Created February 14, 2017 15:27
#!/usr/bin/env tclsh
# MOTD script original? / mod mewbies.com
# Save as /etc/motd.tcl and add "/etc/motd.tcl" to the end of your /etc/profile
# You'll also need to:
# - sudo apt-get install tcl
# - delete the contents of /etc/motd
# - sudo chmod 755 /etc/motd.tcl
# - comment out "uname -snrvm > /var/run/motd.dynamic" in /etc/init.d/motd
# - change "PrintLastLog yes" to "PrintLastLog no" in /etc/ssh/sshd_config
@sebble
sebble / stars.sh
Last active April 5, 2025 09:13
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@andrewlkho
andrewlkho / debian-strongswan.md
Last active April 16, 2025 15:03
Setting up a secure VPN with strongSwan on debian

With heightening concern regarding the state of internet privacy (fuelled in part by the passing of the Investigatory Powers Act in the UK), I have set up a VPN server on the virtual server I have hosted with Mythic Beasts. This uses strongSwan and certificate-based IKEv2 authentication.

Assumptions:

  • Debian Jessie server already set up and accessible via debian.example.com, a public IPv4 of 203.0.113.1 and a public IPv6 of 2001:db8::1
  • Client username of me
  • Clients are running the latest versions of macOS and iOS (Sierra and 10 respectively at the time of writing)
  • No need to support any other operating systems (although the setup is easily translated)

For automated deployment of a similar setup, albeit Ubuntu-based and using ansible for deployment, I recommend you take a look at Algo VPN. I used that project as a basis for my configuration.

@miglen
miglen / linux-networking-tools.md
Last active April 16, 2025 02:42
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED
@IMcPwn
IMcPwn / delete-all-messages.js
Last active April 10, 2025 03:36 — forked from niahoo/delete-all-messages.js
Delete all messages in a Discord channel
// Turn on Developer Mode under User Settings > Appearance > Developer Mode (at the bottom)
// Then open the channel you wish to delete all of the messages (could be a DM) and click the three dots on the far right.
// Click "Copy ID" and paste that instead of LAST_MESSAGE_ID.
// Copy / paste the below script into the JavaScript console.
// If you're in a DM you will receive a 403 error for every message the other user sent (you don't have permission to delete their messages).
var before = 'LAST_MESSAGE_ID';
clearMessages = function(){
const authToken = document.body.appendChild(document.createElement`iframe`).contentWindow.localStorage.token.replace(/"/g, "");
const channel = window.location.href.split('/').pop();
@pjmavadiya
pjmavadiya / last-modified.py
Created October 20, 2016 09:19
Python : Determine last modified time of a web page
#!/usr/bin/python2.7
import requests
import sys
from urlparse import urlparse
#This will return last modified time of given web page url
def get_last_modified(url):
result = urlparse(url)
if True if [result.scheme, result.netloc, result.path] else False:
header = requests.head(url).headers