This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import junitparams.JUnitParamsRunner | |
import junitparams.Parameters | |
import org.junit.Test; | |
import org.junit.Assert.*; | |
import org.junit.Before | |
import org.junit.runner.RunWith | |
import org.junit.runners.Parameterized | |
import java.util.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
Copyright (c) 2021 Steve Hannah | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# -*- Python -*- | |
# | |
# http://www.employees.org/~mstenber/iphonebackupdb.py | |
# | |
# $Id: iphonebackupdb.py,v 1.2 2010/05/28 08:30:38 mstenber Exp $ | |
# | |
# Author: Markus Stenberg <fingon@iki.fi> | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/openvpn.log { | |
daily | |
rotate 12 | |
compress | |
copytruncate | |
delaycompress | |
missingok | |
notifempty | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Intersect two maps with same keys, but different data types. Preserves the order of the first map. | |
* Returns a list of the combined type provided by the transformation. | |
*/ | |
inline fun <Key, Value1, Value2, T> Map<Key, Value1>.intersectWith( | |
other: Map<Key, Value2>, | |
transformationFunction: (Value1, Value2) -> T): List<T> { | |
return flatMap { oldEntry -> | |
other.filterKeys { it == oldEntry.key } | |
.map { transformationFunction(oldEntry.value, it.value) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Needed for debian upgrade | |
# atm from buster to bullseye the linked libs are broken | |
# see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951880 | |
LIB="libcrypt.so.1" | |
# Checks if the executer has super user permissions. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text; | |
namespace YourApp.Util | |
{ | |
/// <summary> | |
/// A managed implementation of the Unix C library crypt function. It supports the MD5, SHA-256 | |
/// and SHA-512 algorithms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
username: "Test" | |
password: "123456" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.reflect.full.declaredMemberProperties | |
import kotlin.reflect.full.primaryConstructor | |
/** | |
* Merge two data classes | |
* | |
* The resulting data class will contain: | |
* - all fields of `other` which are non null | |
* - the fields of `this` for the fields which are null in `other` | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kill -9 <sshfs pid> | |
fusermount -u <mountpoint> |
OlderNewer