Skip to content

Instantly share code, notes, and snippets.

View mattgorecki's full-sized avatar

Matt Gorecki mattgorecki

View GitHub Profile
@justincjahn
justincjahn / README.md
Last active January 16, 2024 20:15
Minecraft server(s) using systemd and screen.

Install

# Install dependencies
sudo yum install -y java-1.8.0-openjdk screen

# Create a new unprivileged user for minecraft
useradd -r -m -d /opt/minecraft minecraft

# Create the directory that will house our minecraft instances

sudo su --shell /bin/bash minecraft

@radupotop
radupotop / iperf3.service
Last active January 12, 2019 08:04
iperf3.service for systemd
[Unit]
Description=iperf3 server
After=syslog.target network.target auditd.service
[Service]
User=iperf
ExecStart=/usr/bin/iperf3 -s --logfile /var/log/iperf.log
[Install]
WantedBy=multi-user.target
@kyledrake
kyledrake / ferengi-plan.txt
Last active October 3, 2024 15:12
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@tmornini
tmornini / gist:10551841
Last active November 24, 2015 19:04
Subledger v2 create_and_post JSON body
{
"effective_at": "ISO8601 Date/Time",
"description": "Free form text",
"reference": "URL",
"lines": [
{
"account": "account_id",
"value": {
"type": "debit",
"amount": "10.00"
#! /usr/bin/python
import Image
#_______________________________________________________load image/create 'canvas'
source = Image.open("test26.jpg")
img = source.load()
print source.format
#! /usr/bin/python
import Image
#Created by vvdr12
#Fully open license. Have fun.
#change threshold value in 'def contrastpoints' for higher/lower line density.
#put a 'test.jpg' file in the same folder as the code.
#_functions______________________________________________
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
@mahmoudimus
mahmoudimus / fabfile.py
Created April 30, 2010 07:43 — forked from cyberdelia/fabfile.py
fabric deployment example
from fabric.api import env, run, sudo, local, put
def production():
"""Defines production environment"""
env.user = "deploy"
env.hosts = ['example.com',]
env.base_dir = "/var/www"
env.app_name = "app"
env.domain_name = "app.example.com"
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name }