Skip to content

Instantly share code, notes, and snippets.

View zekroTJA's full-sized avatar
🚀
Fuck it, ship it!

Ringo Hoffmann zekroTJA

🚀
Fuck it, ship it!
View GitHub Profile
@zekroTJA
zekroTJA / urbanDictionaryApi.js
Created April 18, 2018 11:32
Simple UrbanDictionary.com API module for NodeJS
/**
* © 2018-present Ringo Hoffmann (zekro Development)
* zekro.de | contact@zekro.de
* READ BEFORE USAGE: http://zekro.de/policy
*
* ATTENTION:
* This code is inspired and refers on the code from
* mvrilo's Project 'urban' on GitHub:
* https://github.com/mvrilo/urban/blob/master/lib/urban.js#L66
*/
@zekroTJA
zekroTJA / example_usage.rb
Last active June 5, 2018 14:45
Small endless timer checking time by minutes and seconds and executing function in thread
require_relative 'timer'
TRIGGER_TIMES = [
[10, 30],
[14, 45],
[17, 10]
]
Timer.new TRIGGER_TIMES, 15 do
@zekroTJA
zekroTJA / cloc_args.txt
Last active May 4, 2018 21:26
script to cloc all repositroies from a specific github user
--exclude-lang=XML,Markdown,JSON,TOML,YAML,"MSBuild script","Qt Project","Windows Resource File" --not-match-f \w+.Designer.cs
@zekroTJA
zekroTJA / Ubuntu 17.10 VM Documentation.md
Last active May 13, 2018 11:51
How to set up a VM with Ubuntu 17.10

How to create a Ubuntu 17.10 VM

Setup

  1. Create VM, Configuring and adding Disk Image
  2. VRAM → 256MB
λ VBoxManage.exe modifyvm "Ubuntu 17.10" --vram 256
  1. start VM
@zekroTJA
zekroTJA / simplelist.cpp
Last active May 16, 2018 12:28
A simple, single linked, dynamic list class in C++
/*
(c) 2018 Ringo Hoffmann
SimpleLinkedList v.0.4.0
*/
#include <iostream>
using namespace std;
// Nur um eine Exception throwen zu können, wenn ein Index

Raspberry Pi NAS

  1. Install NTFS and samba
# apt install ntfs-g3 samba samba-common-bin
  1. Attach NAS drive to RasPi and get device name
$ fdisk -l
@zekroTJA
zekroTJA / .NET Core Deploy.md
Last active June 6, 2018 07:25
Simple documentation how to set up .NET Core project deployment in Visual Studio 2017

V1: As Library

  1. Build: DebugRelease

  2. Create Release

  3. Create release preset

@zekroTJA
zekroTJA / C# Publisher-Subscriber-Pattern.cs
Last active January 14, 2022 22:28
C# .NET Publisher-Subscriber-Pattern example
// SOURCE:
// https://www.codeproject.com/articles/866547/publisher-subscriber-pattern-with-event-delegate-a
using System;
namespace DotNetTest
{
class Program
{
static void Main(string[] args)
@zekroTJA
zekroTJA / C# IoC-Example.cs
Last active June 6, 2018 11:04
C# IoC-Pattern example
// SOURCE:
// http://joelabrahamsson.com/inversion-of-control-an-introduction-with-examples-in-net/
using System;
using System.Collections.Generic;
namespace DotNetTest
{
class Program
{
@zekroTJA
zekroTJA / C# DI-Example.cs
Last active June 8, 2018 08:28
C# Dependency Injection Pattern example
// SOURCES:
// https://stackoverflow.com/questions/14301389/why-does-one-use-dependency-injection
// http://www.codearsenal.net/2015/03/c-sharp-dependency-injection-simple.html#.Wxo7iIozaHs
using System;
namespace DotNetTest
{