Skip to content

Instantly share code, notes, and snippets.

View jakoch's full-sized avatar
💭
😎 #include <Berlin.h> #include <C++>

Jens A. Koch jakoch

💭
😎 #include <Berlin.h> #include <C++>
View GitHub Profile
@jakoch
jakoch / gist:3a8cb01f6a991807c7dd
Created January 2, 2015 11:23
CLI tool - UTF-8 / BOM encoding check for directory tree
#!/bin/bash
#
# CLI Tool for checking the UTF-8 encoding of files in a directory tree.
#
function usage() {
echo -e "Usage: $0 <directory>"
}
# Some good standards, which are not used if the user
# creates his/her own .bashrc/.bash_profile
export PATH="$PATH:/c/cerver/bin/nodejs/:/c/server/bin/nodejs/node_modules/npm/:/c/server/bin/ruby/bin/"
# --show-control-chars: help showing Korean or accented characters
alias ls='ls -F --color=auto --show-control-chars'
alias ll='ls -l'
alias www='cd /c/server/www/'
alias st='cmd //c /d/#portable/Total\ Commander/Plugins/exe/SublimeText3/subl.exe'
@jakoch
jakoch / znc_debian_install.sh
Last active October 1, 2015 18:28
ZNC Installation Script for Debian
#!/bin/bash
#
# ZNC Installation Script for Debian
# ----------------------------------
# Author: Jens-Andre Koch
# Date: 14.03.2012
# --------------------------------<3
# fetch znc-version.tar.gz archive from github
wget --no-check-certificate https://github.com/znc/znc/archive/znc-1.2.tar.gz -O - | tar xz

Keybase proof

I hereby claim:

  • I am jakoch on github.
  • I am jakoch (https://keybase.io/jakoch) on keybase.
  • I have a public key ASAPK6mQNUPQNqGpZYH-5u5DLyn9FfRX5K4dPDr7OEyR0Qo

To claim this, I am signing this object:

@jakoch
jakoch / smf_auth.py
Created May 9, 2019 14:13
Authenticate Trac (bugtracker) users against Simple Machines Forum
#!/usr/bin/python
# Authenticate Trac (bugtracker) users against Simple Machines Forum
# Author: Derek Anderson
# Date: 29-01-2008
# Source: http://armyofevilrobots.com/auth_trac_against_smf
try:
from mod_python import apache
except:
@jakoch
jakoch / block-csgo-matchmaking-servers.md
Created May 18, 2020 17:47
Block all CS:GO MatchMaking Servers (allow only Amsterdam, Frankfurt, London, Luxemburg, Vienna)

Block all CS:GO MatchMaking Servers (allow only Amsterdam, Frankfurt, London, Luxemburg, Vienna)

IPs are taken from github.com/SteamDatabase/SteamTracking/Random/NetworkDatagramConfig.json

Add Firewall Rule to lock servers

netsh advfirewall firewall add rule name="csgo-mm-servers-block" dir=out action=block remoteip=18.162.88.34/32,34.85.12.153/32,34.85.40.62/32,34.85.47.228/32,34.212.218.15/32,42.81.120.140/32,42.81.120.141/32,42.81.120.142/32,42.81.120.143/32,42.81.120.144/32,42.81.120.145/32,61.182.135.15/32,61.182.135.16/32,61.182.135.18/32,61.182.135.72/32,103.10.124.40/32,103.10.124.43/32,103.10.124.44/32,103.10.124.45/32,103.10.124.99/32,103.10.124.100/32,103.10.124.101/32,103.10.124.102/32,103.10.125.146/32,103.10.125.154/32,103.10.125.162/32,111.32.164.141/32,111.32.164.142/32,111.32.164.143/32,111.32.164.144/32,111.32.164.145/32,111.32.164.146/32,116.211.132.11/32,116.211.132.12/32,116.21
@jakoch
jakoch / build-static-qt.ps1
Created October 29, 2014 13:36
Build static version of Qt (Windows)
#-----------------------------------------------------------------------------
#
# Copyright (c) 2013, Thierry Lelegard
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
@jakoch
jakoch / highlightjs-webworker.html
Created July 18, 2016 17:49
Highlight multiple chunks of code by using WebWorkers and Highlight.js
<html>
<head>
<title>highlight.js Code by using WebWorkers</title>
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<!--<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/github.min.css">-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/monokai_sublime.min.css">
<script>
function highlight_code()
{
if (typeof (Worker) === undefined)
@jakoch
jakoch / Versioning.cmake
Created July 3, 2021 13:52
cmake versioning based on GIT version control infos
#
# Versioning
#
# Usage:
#
# include(Versioning.cmake)
#
#-------------------------------------------------------------------
@jakoch
jakoch / appveyor.yml
Created July 10, 2021 17:29
appveyor build script for an ttauri based application
#-------------------------------------------------------------------
# AppVeyor build configuration
# https://www.appveyor.com/docs/
# https://www.appveyor.com/docs/appveyor-yml/
#-------------------------------------------------------------------
clone_depth: 5
version: '{build}'