Skip to content

Instantly share code, notes, and snippets.

View RavuAlHemio's full-sized avatar

Ondřej Hošek RavuAlHemio

View GitHub Profile
@RavuAlHemio
RavuAlHemio / contao3.conf
Last active July 21, 2017 21:51
Contao 3 and 4 nginx.conf
index index.php index.html;
location ~ ^/(favicon\.ico|robots\.txt)$ {
allow all;
log_not_found off;
access_log off;
}
# don't show templates
location ~* \.(tpl|html5|xhtml)$ {
@RavuAlHemio
RavuAlHemio / composer.lock
Created August 25, 2015 07:58
my Contao 4 standard edition composer.lock file
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "5a72faa19b6f9586f9a81bf0a9c7e379",
"packages": [
{
"name": "contao-components/ace",
@RavuAlHemio
RavuAlHemio / JsonObjectExample.cs
Created September 17, 2015 07:23
Example of NewtonSoft.Json usage, JsonObject edition
using Newtonsoft.Json;
namespace JsonObjectExample
{
[JsonObject(MemberSerialization.OptIn)]
class UserData
{
[JsonProperty("username")]
public string Username { get; set; }
@RavuAlHemio
RavuAlHemio / FiveMinuteChunks.cs
Last active September 25, 2015 08:42
counting print jobs, five minutes at a time (pseudo-C#)
DateTime start = new DateTime(2015, 1, 13, 0, 0, 0);
DateTime end = start.AddDays(1);
List<PrintJob> jobs = GetPrintJobsOnDay(start);
List<JobStatisticsEntry> statsEntries = new List<JobStatisticsEntry>();
jobs.Sort(j => j.DateTimePerformed);
int jobIndex = 0;
// for each five-minute chunk of this day
for (DateTime partStart = start; partStart < end; partStart = partStart.AddMinutes(5))
@RavuAlHemio
RavuAlHemio / deutsch.txt
Last active March 27, 2016 17:57
ICAO airport codes that match against a wordlist
BIST
EBBE
EDEL
EDEN
EDER
EDLE
EFEU
EFTA
EGEL
EGOS
@RavuAlHemio
RavuAlHemio / NotDeepNote.cs
Created October 19, 2016 00:28
Not Deep Note (the THX sound)
// Not Deep Note
//
// Released into the public domain.
// http://creativecommons.org/publicdomain/zero/1.0/
using System;
using System.IO;
static class NotDeepNote
{
@RavuAlHemio
RavuAlHemio / wann-werde-ich-adeliger.md
Created November 13, 2016 15:50
österreichische Amtstitel im allgemeinen Verwaltungsdienst

Beamte werden in Verwendungs- und darunter in Funktionsgruppen eingeteilt, Vertragsbedienstete in Entlohnungs- und darunter in Bewertungsgruppen.

Die Verwendungsgruppen von Beamten werden in die Funktionsgruppen Grundlaufbahn (GL) und mehrere nummerierte Funktionsgruppen (FG) unterteilt. Die Bewertungsgruppen von Vertragsbediensteten werden teilweise in Bewertungsgruppen unterteilt.

Für Beamte der Verwendungsgruppe A1, die einen Bachelor- und keinen höheren Abschluss besitzen, gelten teilweise andere mindeste Besoldungsdienstalter; die relevanten Spalten sind in der Zeile Funktionsgruppe mit dem Zusatz Bach ausgewiesen.

Kranichkirchen

Ondras Namen für den OOP-LVA-Team-Verteiler und Prof. Puntigams Reaktionen darauf.

Kontrollorgane des Kranichkirchener Kürbiskonstruktionskonzerns KG

Ich fürchte Schlimmes für den Kürbiskonstruktionskonzern. Wenn sich die Kranichkirchener so gut verstehen wie ''[Gruppe]'' 110, wird die KG in wenigen Wochen Geschichte sein.

Kranichkirchener Koalition für Konkludenz im Kommerz

using System;
using System.DirectoryServices;
using System.Runtime.InteropServices;
using System.Net;
using System.Security.Cryptography;
using System.Text;
public class RebuildDomainTrust
{
static void UsageAndExit(int exitCode)
@RavuAlHemio
RavuAlHemio / Restoring an utterly destroyed DFSR-replicated SYSVOL from backup.md
Last active March 24, 2025 16:54
Steps to restore an utterly destroyed DFSR-replicated SYSVOL from backup

Restoring an utterly destroyed DFSR-replicated SYSVOL from backup

Warning: this is not official Microsoft documentation and some of these steps might not actually be supported.

This guide is provided "as is", without warranty of any kind, express or implied. In no event shall the authors or copyright holders be liable for any claim, damages or other liability arising from, out of or in connection with applying the steps outlined in this guide.

When to use