Skip to content

Instantly share code, notes, and snippets.

DerZyklop

Block or report user

Report or block DerZyklop

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@DerZyklop
DerZyklop / ksdiff-batch.sh
Last active Oct 9, 2019 — 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.
View ksdiff-batch.sh
#!/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 Aug 20, 2019 — forked from michenriksen/disposable-email-provider-domains
List of disposable email provider domains
View 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
View foo.md

1:

<div>
  <p-foo [shift]="shift"></p-foo>
  <p-foo [shift]="shift"></p-foo>

  <p-bar [shiftModel]="shiftModel"></p-bar>
</div>

2:

@DerZyklop
DerZyklop / function-performance-test.js
Created Nov 2, 2018 — forked from AllThingsSmitty/function-performance-test.js
A quick JavaScript function performance test on the browser console
View function-performance-test.js
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 / .htaccess
Last active Oct 12, 2018
Kirby .htaccess
View .htaccess
# Kirby .htaccess for Projects by DerZyklop
# Source: https://gist.github.com/DerZyklop/609d1e0245c798ceccec7c7fba660041
# Deflate Compression by MimeType
<IfModule mod_deflate.c>
<FilesMatch "\.(js|jpg|jpeg|gif|png|css)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>
View uberspace.config.sh
uberspace-configure-webserver enable hsts
uberspace-configure-webserver enable nosniff
uberspace-configure-webserver enable xframe_deny
uberspace-configure-webserver enable xxss_protection
View gist:cc5f09edc38e17d20f800d372652dead
* {
// https://twitter.com/mmatuzo/status/968479911668338689
-webkit-line-clamp: 3;
}
@DerZyklop
DerZyklop / genitive.ts
Last active Sep 6, 2017
Add the correct genitive ending to a given name.
View genitive.ts
/**
* Add the correct genitive ending to a given name.
*/
private addGenitiveEnding(name : string) : string {
if (name.charAt(name.length - 1).match(/[s|z|ß|x]/)) {
return name + '';
} else {
return name + 's';
}
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@DerZyklop
DerZyklop / brew-perms.sh
Created Mar 7, 2017 — 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.
View brew-perms.sh
#!/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
You can’t perform that action at this time.