Skip to content

Instantly share code, notes, and snippets.

@DerZyklop
DerZyklop / ksdiff-batch.sh
Last active October 9, 2019 07:34 — forked from jorgenpt/ksdiff-batch.sh
Batches multiple invocations of ksdiff to open in a single Kaleidoscope window if they happen within a few seconds of eachother. This is useful for Kaleidoscope integration with P4V, since it makes a multi-file diff open in a single window. If it doesn't quite pick up all your files, try setting TIMEOUT to more than 4 seconds.
#!/bin/bash
# Commandline tools required for this script:
# pidof (can be installed with `brew install pidof`)
# lockfile (can be installed with `brew install procmail`)
# Number of seconds we wait after a file is received before we consider the
# batch to be completed.
TIMEOUT=2
# Title of the tab in Kaleidoscope
@DerZyklop
DerZyklop / disposable-email-provider-domains
Last active August 20, 2019 11:43
List of disposable email provider domains
0815.ru
0wnd.net
0wnd.org
10minutemail.co.za
10minutemail.com
123-m.com
1fsdfdsfsdf.tk
1pad.de
20minutemail.com
21cn.com
@DerZyklop
DerZyklop / function-performance-test.js
Created November 2, 2018 11:33 — forked from AllThingsSmitty/function-performance-test.js
A quick JavaScript function performance test on the browser console
var i = performance.now();
yourFunction();
performance.now() - i;
//Or make a helper function, like this:
function performanceTest(testFunction, iterations) {
'use strict';
var sum = 0;
var start = performance.now();
for (var i = 0; i < iterations; i++) {
@DerZyklop
DerZyklop / brew-perms.sh
Created March 7, 2017 09:54 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew
@DerZyklop
DerZyklop / openVPNreconnect
Created August 29, 2014 14:08 — forked from aelveborn/vpn-status.sh
Synology DSM 5 VPN reconnection script.Save file to /usr/openVPNreconnect then run chmod +x /usr/openVPNreconnect. Schedule by following http://forum.synology.com/enu/viewtopic.php?f=241&t=65444
# Replace o1234567890 with your OpenVPN id. To get your id, start the VPN and run ps|grep client_o
# Replace YOUR_VPN_NAME with the name of your VPN profile in DSM 5 admin panel.
if echo `ifconfig tun0` | grep -q "00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00"
then
echo "VPN is running"
else
echo conf_id=o1234567890 > /usr/syno/etc/synovpnclient/vpnc_connecting
echo conf_name=YOUR_VPN_NAME >> /usr/syno/etc/synovpnclient/vpnc_connecting
echo proto=openvpn >> /usr/syno/etc/synovpnclient/vpnc_connecting
@DerZyklop
DerZyklop / kirby-submission-honeypot.php
Created June 11, 2014 10:46 — forked from anonymous/gist:e2726b63dc5247ead60a
Kirby Submission Plugin with Honeypot Spam Detection. This is just @dweidner's template for using the Honeypot. See: https://github.com/bastianallgeier/kirbycms-extensions/pull/61#issuecomment-29104650
<?php
$form = new contactform(array(
'to' => 'Daniel Weidner <hallo@danielweidner.de>',
'from' => 'Contact Form <kontakt@danielweidner.de>',
'subject' => 'Neue Nachricht',
'goto' => null,
'honeypot' => 'email-repeat-142'
));
@DerZyklop
DerZyklop / dabblet.css
Created April 17, 2012 20:36 — forked from anonymous/dabblet.css
Untitled
.box { width: 100px; height: 100px; margin: 1px; background: #bbbbbb; }
.eins {
position: absolute;
top: 10px;
left: 100px;
}
.zwo {