Skip to content

Instantly share code, notes, and snippets.

View Rusk85's full-sized avatar

Rusk85

  • a statutory health insurance company
  • Germany
View GitHub Profile
@Rusk85
Rusk85 / MemoryStreamOperations.cs
Created February 27, 2017 19:54
Extracted repeating operations on MemoryStream to separate Method in accordance with DRY. Will it explode?
public byte[] WriteRecords<T>(IEnumerable<T> records, CsvClassMap classMap = null)
{
if (!records.Any()) { return null; }
byte[] buffer;
using (var memoryStream = new MemoryStream())
using (var streamWriter = new StreamWriter(memoryStream))
{
buffer = WriteStreamToByteArray(memoryStream, streamWriter);
}
return buffer;
@Rusk85
Rusk85 / ByReferenceOrByValue.cs
Last active December 26, 2016 07:43
Experimenting with C# behavior when passing variables
using System;
using System.Diagnostics;
namespace CSharpReferencePlayground
{
internal enum PlaygroundGame
{
ByRefByValAssignment_1
}
@Rusk85
Rusk85 / hosts.txt
Last active October 11, 2016 15:50
adaway hosts file 11-10-2016
This file has been truncated, but you can view the full file.
# This hosts file is a merged collection of hosts from reputable sources,
# with a dash of crowd sourcing via Github
#
# Date: October 10 2016
# Extensions added to this file: gambling, porn, social
# Number of unique domains: 35,916
#
# Fetch the latest version of this file: https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling-porn-social/hosts
# Project home page: https://github.com/StevenBlack/hosts
#
@Rusk85
Rusk85 / Private.asc
Last active June 10, 2025 17:15
ppkeys
-----BEGIN PGP PRIVATE KEY BLOCK-----
Version: APG v1.1.1
lQc+BFeB+OUBEAC4W57wvTJWRpTqMkj+cELa4XCxfyTY1t0PmtrO1tU6XuO16x75
+uCrM/a1OTJ/AzOZaukolAqRMXkzOqqK7T40rqlOUByhWJpVpEshUieFkyDBpYwW
VBRhA+Abf+8z2SMvwtcZ4ueULgDhmChDizS1PBT0932N/OXwEqhcOXXilLychhiB
a9uGq2kUa5d/akjpQAtkqa/7gmC5s8cYxiYk2cySCsVTb2BJXtLJzCl1smdrLTRs
bmNRoSGAIG4XdqUXnRj2+E2vERks3E+wkvguwAiOHEpQvD4jlaCYHsFgg5X9BE42
pYCVCy7KZXQ4DcnV6RY6Iiux/JkrHzi97ylQOh3c3rGWQFhaqbk2jIEAzwE/CL/H
8aTPYjTR4wF1EiimJLNru7KlqCVJdnYw8FkLDD44tJpsJOHxRgjKj6SNd6QQG8t7
@Rusk85
Rusk85 / Instructions.md
Last active May 12, 2016 02:21
Setting up infrastructure for automated media retrieval and management:

#Setting up infrastructure for automated media retrieval and management

##Requirements

###OS Preferably a linux distribution such as Ubuntu or Debian. I recommend Arch Linux which I have installed on both my server as well as HTPC. It has a bit of a steeper learning curve but is a very well supported, lightweight distri that can be set up in any way you like it. It comes without a window composition system (read: X.Server w/ gnome or such aka Desktop GUI). If you prefer a GUI and are not yet very familiar with a terminal I then would advise you to install Ubuntu Desktop variant. Terminal use should be limited to a minimum. Now AFAIK for the tools/software packages that need to be installed on your server Windows should be supported by all those but I cant guarantee it.

####Arch Linux If you decide to go with arch linux here are a few of links that should get you started:

@Rusk85
Rusk85 / nfs_automount.sh
Created January 27, 2016 14:06 — forked from aldur/nfs_automount.sh
Mount an NFS share on Android
#!/bin/sh
# Mount an NFS share on Android
# Requirements:
# - Busybox
# - A kernel supporting nfs (either built-in or as a module)
# On my Nexus 7 2012 I use the following kernel:
# http://forum.xda-developers.com/showthread.php?t=2107224
# Remember: if you have problems of system space, simply delete some of the default stuff.