Skip to content

Instantly share code, notes, and snippets.

@Lochnair
Lochnair / 1.4.5.xml
Created December 8, 2012 23:01
MauncherLoader MC 1.4.5 Patch XML
<?xml version="1.0" encoding="UTF-8"?>
<patches>
<patch name="net.minecraft.client.Minecraft">
<cmdarg name="datafolder" helptext="Folder to change .minecraft to">{MINECRAFT_DIR}</cmdarg>
<field name="an" type="java.io.File" protection="PUBLIC">new java.io.File("[datafolder]");</field>
<method name="b" protection="PUBLIC">return new java.io.File("[datafolder]");</method>
</patch>
<patch name="net.minecraft.src.ModLoader">
<field name="cfgdir" type="java.io.File" protection="PUBLIC">new java.io.File("[mlcfg]");</field>
@Lochnair
Lochnair / nginx.conf
Last active April 25, 2023 05:23 — forked from taddev/nginx.conf
Nginx reverse proxy to Exchange 2010/2013
server {
listen 80;
#listen [::]:80;
server_name mail.gwtest.us autodiscover.gwtest.us;
return 301 https://$host$request_uri;
}
server {
listen 443;
#listen [::]:443 ipv6only=on;
@Lochnair
Lochnair / squid_3.5_with-ssl.patch
Last active August 8, 2016 20:31
Patch to enable SSL in Ubuntu Squid package
diff -r -U2 squid3-3.5.12-orig/debian/rules squid3-3.5.12/debian/rules
--- squid3-3.5.12-orig/debian/rules 2016-08-08 22:30:31.461962394 +0200
+++ squid3-3.5.12/debian/rules 2016-08-08 22:30:57.034275275 +0200
@@ -23,4 +23,6 @@
--enable-inline \
--disable-arch-native \
+ --enable-ssl \
+ --enable-ssl-crtd \
--enable-async-io=8 \
--enable-storeio="ufs,aufs,diskd,rock" \
@Lochnair
Lochnair / mips_toolchain.sh
Last active March 4, 2017 17:27 — forked from fgrep/wheezy-mips-toolchain
Debian wheezy mips(el) toolchain
#!/bin/sh
# Debian 7 MIPS Toolchain
ARCH=${ARCH:-mips}
# Update
mkdir /usr/src/$ARCH-toolchain && cd /usr/src/$ARCH-toolchain
apt-get update
apt-get upgrade
@Lochnair
Lochnair / gcc-4.7.2-musl.diff
Last active April 25, 2017 17:19
musl support for GCC 4.7.2
diff -r -U3 a/config.sub b/config.sub
--- a/config.sub 2017-04-25 18:33:42.050700561 +0200
+++ b/config.sub 2017-04-25 18:45:28.590275476 +0200
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011 Free Software Foundation, Inc.
-timestamp='2011-10-29'
+timestamp='2011-03-23'
pipeline {
agent none
stages {
stage('Prepare') {
agent any
steps {
checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: 'git://git.zx2c4.com/WireGuard']], branches: [[name: 'refs/tags/*']]], poll: true
sh 'git reset --hard'
From 00a970f9ce4a97e8f46f24c90c0242a658143457 Mon Sep 17 00:00:00 2001
From: Nils Andreas Svee <me@lochnair.net>
Date: Sun, 3 Mar 2019 23:44:16 +0100
Subject: [PATCH] Only use __vmalloc for now
---
src/compat/compat.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/compat/compat.h b/src/compat/compat.h
From 00a970f9ce4a97e8f46f24c90c0242a658143457 Mon Sep 17 00:00:00 2001
From: Nils Andreas Svee <me@lochnair.net>
Date: Sun, 3 Mar 2019 23:44:16 +0100
Subject: [PATCH] Only use __vmalloc for now
---
src/compat/compat.h | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/src/compat/compat.h b/src/compat/compat.h
@Lochnair
Lochnair / wg-jenkinsfile
Created May 19, 2019 10:13
wg-jenkinsfile
pipeline {
agent none
stages {
stage('Prepare') {
agent any
steps {
checkout scm: [$class: 'GitSCM', userRemoteConfigs: [[url: 'https://git.zx2c4.com/WireGuard']], branches: [[name: 'refs/tags/*']]], poll: true
sh 'git reset --hard'
@Lochnair
Lochnair / ubnt-kernels-git-import.py
Last active April 16, 2023 04:40
UBNT kernels Git repo import
import os
import re
import shutil
import tarfile
from operator import itemgetter
import git
import requests
import sys
from git import Repo, Actor, Head, GitCmdObjectDB, InvalidGitRepositoryError