Skip to content

Instantly share code, notes, and snippets.

import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
/**
* This is an example-implementation, showing how to download a raw-RSS
* feed from a web-address and how to write it's content to a File.</p>
* All Exceptions are handled internally by their corresponding methods.
* In a real-use scenario, this might be the wrong way, since your
@LukasKnuth
LukasKnuth / DxDiag
Created September 29, 2012 14:31
Torchlight 2 - Bug logs
------------------
System Information
------------------
Time of this report: 9/29/2012, 15:22:14
Machine name: LUKE-PC
Operating System: Windows 8 Pro 64-bit (6.2, Build 9200) (9200.win8_rtm.120725-1247)
Language: German (Regional Setting: German)
System Manufacturer: Apple Inc.
System Model: Macmini3,1
BIOS: Default System BIOS
@LukasKnuth
LukasKnuth / session.log.old
Created November 16, 2012 01:21
session.log
/etc/gdm/Xsession: Beginning session setup...
localuser:luke being added to access control list
/etc/gdm/Xsession: Setup done, will execute: /usr/bin/ssh-agent -- gnome-session
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-9wq22l
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-9wq22l
SSH_AUTH_SOCK=/run/user/1000/keyring-9wq22l/ssh
GPG_AGENT_INFO=/run/user/1000/keyring-9wq22l/gpg:0:1
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-9wq22l
SSH_AUTH_SOCK=/run/user/1000/keyring-9wq22l/ssh
GNOME_KEYRING_CONTROL=/run/user/1000/keyring-9wq22l
@LukasKnuth
LukasKnuth / PKGBUILD
Created December 25, 2013 12:10
Updated PKGBUILD for the leap motion drivers.
# Maintainer: Helge Rausch <helge@rausch.io>
# This script is licensed under the MIT license.
# https://gist.github.com/tsujigiri/5476281
#
## Installation
#
# To install the Leap software, you first need to download the SDK for Linux
# from https://developer.leapmotion.com/downloads/leap-motion/sdk using your
# developer account. Unpack it, place the included .deb files in the same
# directory as this PKGBUILD and run `makepkg`. If all goes well this will
@LukasKnuth
LukasKnuth / README
Created March 7, 2012 10:40
A simple script that helps setting up your portable tools in the msysgit-shell.
-- Add Portable software to your msysgit-PATH --
If you like to work with your *nix shell even under Windows, you'll
likely use the git-bash provided by msysgit a lot.
A problem might be, that you don't have your tools in the PATH of that
shell and therefore can't use them. Those tools might be on the same
USB-drive as the git-shell, so you would have to adjust the PATH
(if you're allowed to) every time the drive-letter changes.
# This is a BoxStarter Script. See https://boxstarter.org/
### BEFORE
#
# * Make sure this is run on Windows 10 Pro (required for Hyper-V)
# * Enable Virtualization in BIOS/UEFI (required for Hyper-V)
# Basic Configuration
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Disable-GameBarTips
# This is a BoxStarter Script. See https://boxstarter.org/
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions -EnableShowFullPathInTitleBar
Disable-GameBarTips
Disable-BingSearch
# Install Basics
cinst -y firefox 7zip cpu-z windirstat hwmonitor choco-cleaner
# Install Multimedia
@LukasKnuth
LukasKnuth / gist:40c53447ff0c980297c010939a6b9cdd
Created July 20, 2020 11:07
Encode to H265, no quality loss
#!/bin/bash
function encode {
# Add a "?" at the end of a "map" to say "if available"
# For a preview: add "-ss 0" before "-i" and "-t 120" before the output file. This gives a 2min sample
ffmpeg -hide_banner \
-i "$1" \
-map_metadata 0 \
-map_chapters 0 \
-metadata title="$2" \
-map 0 \
@LukasKnuth
LukasKnuth / TTS.java
Created June 14, 2014 14:59
A TTS (Text-To-Speech) wrapper with extended functionality, designed to be robust and easy to use.
import android.annotation.TargetApi;
import android.content.Context;
import android.media.AudioManager;
import android.os.Build;
import android.speech.tts.TextToSpeech;
import android.speech.tts.UtteranceProgressListener;
import android.util.Log;
import java.util.HashMap;
@LukasKnuth
LukasKnuth / fix_arrow_pipe.json
Created May 16, 2022 07:17
Karabiner Elements "complex modification" to fix the arrow-brackets (<>) and pipe (|) keys when using the "German Standard" layout in OSX
{
"title": "Personal fixes - Moonlander",
"rules": [
{
"description": "Fixes both Arrow-brackets and the Pipe symbol on the Moonlander keyboard with German layout.",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "non_us_backslash"