Skip to content

Instantly share code, notes, and snippets.

View MTRNord's full-sized avatar
🏠
Working from home

Marcel MTRNord

🏠
Working from home
View GitHub Profile
@jhass
jhass / nginx.conf
Last active May 12, 2022 02:13
Nginx Diaspora reverse proxy. - This is not a complete Nginx configuration! It only shows the relevant parts for integrating Diaspora.
# This is not a complete Nginx configuration! It only shows the relevant parts for integrating Diaspora.
# [...]
http {
# Your standard server configuration goes here
# [...]
gzip_static on;
@ianmackinnon
ianmackinnon / match.c
Created August 8, 2012 12:01
C Regex multiple matches and groups example
# gcc -Wall -o match match.c && ./match
#
#include <stdio.h>
#include <string.h>
#include <regex.h>
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@quantenProjects
quantenProjects / Readme
Last active May 13, 2017 19:50
Greasemonkey Exportscript für die Blitzanalyse auf http://kachelmannwetter.com/de/blitze
Zeit und Datum auswählen, dann in den gewünschten Bereich in der Karte klicken. Ein Fenster öffnet sich und zeigt die Blitzdetails an. Dieses wieder schließen und am Ende der Seite auf Export klicken. Dann den Inhalt des Textfeldes kopieren und in eine Datei mit Endung .gpx schreiben. Als Name wird die Stromstärke angegeben
@PurpleBooth
PurpleBooth / README-Template.md
Last active May 9, 2025 19:51
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@MTRNord
MTRNord / build_nginx.sh
Last active August 5, 2016 21:19 — forked from MattWilcox/build_nginx.sh
Fetch, build, and install the latest nginx with the latest OpenSSL for RaspberryPi
#!/usr/bin/env bash
# names of latest versions of each package
export VERSION_PCRE=pcre-8.32
export VERSION_OPENSSL=openssl-1.0.2h
export VERSION_NGINX=nginx-1.11.3
# URLs to the source directories
export SOURCE_OPENSSL=https://www.openssl.org/source/
export SOURCE_PCRE=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/
@quantenProjects
quantenProjects / server_status.py
Created March 14, 2016 17:54
simple server status check for https://github.com/hangoutsbot/hangoutsbot don't forget to activate the plugin in the config
"""
execute w and df -h on server
"""
import plugins
import subprocess
def _initialize(bot):
plugins.register_admin_command(['w'])
plugins.register_admin_command(['df'])
@nornagon
nornagon / 1-intro.md
Last active November 17, 2024 22:16
How to make a Minecraft (1.8) mod

How to make a Minecraft mod

Minecraft mods, especially mods which change the client, are by and large written with Forge. If you visit their website, you'll be greeted abruptly by a mysterious message at the top of an SMF forum, with no clear path towards actually... making a mod. I'm documenting here the steps I went through to get started, in the hopes of helping the next person have an easier time of it.

I'll be using Scala for this guide, but it should be fairly easy to adapt these instructions to any JVM language (e.g. clojure or if you're feeling masochistic, Java). I'm also developing on OS X, so some of the commands will be a little different if you're on Linux or Windows. I'm assuming you have some proficiency with your operating system, so I won't go into details about how to adapt those commands to your system.

Background

Minecraft doesn't have an official mod API (despite early [promises](http://notch.t

# This should be the public-facing name (ie: dns name)
HOME_SERVER_URL="https://matrix.org"
# The room ID is NOT the room alias. The ID can be found at the bottom of the room settings dialog in riot-web
ROOM_ID="!AbCDef823s:matrix.org"
# This is your user ID and access token. The access token must match the user.
USER_ID="@turt2live:matrix.org" # The home server should match this domain as well (ie: t2l.io as a HS should be :t2l.io in the user)
ACCESS_TOKEN="token_here"
@MTRNord
MTRNord / Lookup.md
Last active February 26, 2017 18:01

Requires plugin: lookup.sheetapi

NOTE: You need a Serviceaccount (explained below) and you need to share the sheet with it.

/bot lookup [<MAX] <keyword>

  • Need to enable in config: spreadsheet_enabled, spreadsheet_url and spreadsheet_credentials_file
  • spreadsheet_worksheet allows you to optionaly define the worksheet to use by name.
  • Will look up each row of a spreadsheet and if the keyword is found will return the whole row
  • if