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 / 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 / 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 / .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# 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
{
@zekroTJA
zekroTJA / timeFormat.md
Last active June 8, 2018 08:34
Some time formatting snippets

Time formatting snippets

Java

import java.util.Date;
import java.text.DateFormat;
import java.text.SimpleDateFormat;

private String getTime() {

~ CodersClash ~

Discord Bot Coding Tournament


Sponsored by
@zekroTJA
zekroTJA / git2discord.go
Last active July 17, 2018 12:08
Simple program which can be set into a git hook to pulish commit message as embed on discord with a channel webhook
package main
import (
"fmt"
. "strings"
"os/exec"
"strconv"
args "github.com/zekroTJA/argparser"
"encoding/json"
"net/http"
@zekroTJA
zekroTJA / ArgumentParser.cs
Last active July 20, 2018 08:54
Simple argument pasrer class for C#.
// Copyright 2018 zekro Development
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included