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 / 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.
@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 / 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 / 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 / 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 / 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;
jsgkaavb

Komplette Installation von GitLab-CE auf ner AWS EC2 Instanz

  1. SSH in die Maschine
  2. Docker installieren und starten
  3. GitLab-CE Image pullen und dabei ausführen
  4. Sendmail für Mailversand installieren und configen
  5. gitlab.rb config anpassen für Mailversand
  6. Profit!
Actual String Length: 48
BEFORE: jjcPrPUgFCuhzxqxoKoBLcrOdWMnsSQRGeLQYDBpVtCfxRGD-04.07.2016 14:16.m4a
AFTER: 2016.07.04 14:16 jjcPrPUgFCuhzxqxoKoBLcrOdWMnsSQRGeLQYDBpVtCfxRGD.m4a
Actual String Length: 74
BEFORE: hSoLucHNMMDAvMzyLiYFsAlqmqjhMWjDlsDYJShnoFPtUqlQHhkypPtHGYydTzbQCZpciAOTbL-09.09.2004 19:25.m4a
AFTER: 2004.09.09 19:25 hSoLucHNMMDAvMzyLiYFsAlqmqjhMWjDlsDYJShnoFPtUqlQHhkypPtHGYydTzbQCZpciAOTbL.m4a
Actual String Length: 15
BEFORE: sAELLnvZWrLtdtP-16.11.2011 20:01.m4a
Thank you!! I was hoping that this job could be done just with a couple of shell commands
but this one works perfectly as the tests show. – woros Mar 4 at 13:15
Glad to help. If this solves your problem I would appreciate if you could mark my answer as the solution.
I would go amiss not mentioning that there are certainly unix tools that could accomplish this natively as well.
One such tool would be mmv. It's for mass moving/renaming files using a specific wildcard syntax and
I have used it before as well. I would wager though that for your use case the required command
would end up being non-trivial. – Sven M. Mar 4 at 18:46