Skip to content

Instantly share code, notes, and snippets.

View zaak's full-sized avatar

Paweł Wiaderny zaak

View GitHub Profile
<?php
/**
* View rendering logic.
*
* @author Pawel Wiaderny <pawel.wiaderny@gmail.com>
*/
class View
{
/**
@zaak
zaak / zm-cleanup.php
Created September 28, 2019 09:24
ZoneMinder - remove old events
<?php
function rrmdir($dir)
{
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dir . "/" . $object))
rrmdir($dir . "/" . $object);
@zaak
zaak / gist:dcba4a544061a3233318
Last active August 29, 2015 14:22
JRiddle solution
using System;
using System.Text;
namespace JRiddle
{
class MainClass
{
static void JRiddle()
{
var message = new byte[] {
@zaak
zaak / gist:0959e932cf87dcecea96
Last active August 29, 2015 14:08
GIT: Replace author of the commits
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ];
then
GIT_COMMITTER_NAME="<New Name>";
GIT_AUTHOR_NAME="<New Name>";
GIT_COMMITTER_EMAIL="<New Email>";
GIT_AUTHOR_EMAIL="<New Email>";
git commit-tree "$@";
else
git commit-tree "$@";