Skip to content

Instantly share code, notes, and snippets.

David Zülke dzuelke

Block or report user

Report or block dzuelke

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
@dzuelke
dzuelke / toggle-screen-mirror-with-color-lcd-resolution.workflow
Created Feb 14, 2018
Mac Automator workflow to toggle screen mirroring on 13" MBP so that internal LCD is always 1440x900 retina
View toggle-screen-mirror-with-color-lcd-resolution.workflow
on run {input, parameters}
tell application "Display Menu"
toggle mirroring
select resolution "1440 x 900 Retina" on display "Color LCD"
end tell
return input
end run
@dzuelke
dzuelke / moveHangoutLinks.js
Created Jul 12, 2017
Google Apps Script that handles Hangout/Meet links, with automatic updates and primary calendar detection. See https://medium.com/@JoeSalowitz/how-to-add-google-calendar-hangouts-links-to-mac-and-ios-calendar-events-af365cd93a3c for original post.
View moveHangoutLinks.js
@dzuelke
dzuelke / topofminute.sh
Created Jul 13, 2016
Script to run a command (such as Laravel's "php artisan schedule:run") at the top of every minute, without Cron
View topofminute.sh
#!/bin/bash
topofminute() {
local now;
while true; do
now=$(date "+%S")
now=${now#0} # strip leading zero for arithmetic operations
# run command only if less than ten seconds have passed in the current minute
View keybase.md

Keybase proof

I hereby claim:

  • I am dzuelke on github.
  • I am dzuelke (https://keybase.io/dzuelke) on keybase.
  • I have a public key whose fingerprint is 6EFD ED2E 9DFE 3138 92D2 FFE9 B6E2 901C 11E1 6473

To claim this, I am signing this object:

View pcrejitsize.php
<?php
$re = '{^(\\s*\\{\\s*(?:"(?:[^\\0-\\x09\\x0a-\\x1f\\\\"]+|\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4})*"\\s*:\\s*(?:[0-9.]+|null|true|false|"(?:[^\\0-\\x09\\x0a-\\x1f\\\\"]+|\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4})*"|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[[^\\]]*\\])*\\])*\\])*\\]|(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*)*\\]|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*\\})\\s*,\\s*)*?)("require"\\s*:\\s*)((?:[0-9.]+|null|true|false|"(?:[^\\0-\\x09\\x0a-\\x1f\\\\"]+|\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4})*"|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[(?:[^\\]]*|\\[[^\\]]*\\])*\\])*\\])*\\]|(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*)*\\]|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{(?:[^{}]*|\\{[^{}]*\\})*\\})*\\})*\\})*\\}))(.*)}s';
$str = '{
"config": {
"cache-files-ttl": 0,
"discard-changes": true
},
"minimum-stability": "stable",
View gist:cadb2d9d79759a4cdf0a
[10-Mar-2016 18:49:34 UTC] [2016-03-10 18:49:34] production.ERROR: exception 'BadMethodCallException' with message 'Method after does not exist.' in bootstrap/cache/compiled.php:6254
Stack trace:
#0 bootstrap/cache/compiled.php(2193): Illuminate\Routing\Router->__call('after', Array)
#1 bootstrap/cache/compiled.php(2193): Illuminate\Routing\Router->after(Object(newrelic\Laravel\AfterFilter))
#2 bootstrap/cache/compiled.php(2193): Illuminate\Foundation\Application->boot()
#3 bootstrap/cache/compiled.php(1641): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))
#4 bootstrap/cache/compiled.php(2374): Illuminate\Foundation\Application->bootstrapWith(Array)
#5 bootstrap/cache/compiled.php(2327): Illuminate\Foundation\Http\Kernel->bootstrap()
#6 bootstrap/cache/compiled.php(2312): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#7 public/index.php(54): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Reques
@dzuelke
dzuelke / erp.txt
Created Feb 25, 2016
COMPOSER Y U NO REPLACE OR PROVIDE PLATFORM PACKAGES
View erp.txt
dzuelke-ltm1:wat dzuelke$ PHP_INI_SCAN_DIR= php -c /usr/local/etc/php/5.6/conf.d/ext-mongodb.ini $(which composer) require alcaeus/mongo-php-adapter:dev-master
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing mongodb/mongodb (1.0.0)
Loading from cache
- Installing alcaeus/mongo-php-adapter (dev-master 4adcbe7)
Cloning 4adcbe7a75f3c684bc1651ccdb7addefc089066c
@dzuelke
dzuelke / composer01.json
Created Feb 23, 2016
Composer replace ext test cases
View composer01.json
{
"repositories": [
{
"packagist": false
},
{
"type": "package",
"package": [
{
"type": "metapackage",
@dzuelke
dzuelke / libpq_openssl.php
Created Feb 12, 2016
libpq+openssl conflict reproduce case
View libpq_openssl.php
<p>
<?php
$db = parse_url(getenv("DATABASE_URL"));
$sql = "SELECT repeat('a', 160000)";
$c = pg_connect(sprintf("host='%s' port='%s' dbname='%s' user='%s' password='%s' sslmode='require'", $db["host"], $db["port"], substr($db["path"], 1), $db["user"], $db["pass"]));
$r = openssl_pkey_get_public('a');
@dzuelke
dzuelke / ._wordpress.sh
Last active Feb 3, 2016
Wordpress as Twelve-Factor. Please check https://github.com/dzuelke/wordpress-12factor for the real thing!
View ._wordpress.sh
mkdir wordpress
cd wordpress
git init
curl -LO https://gist.githubusercontent.com/dzuelke/8ef648676cab07f2a177/raw/composer.json
curl -LO https://gist.githubusercontent.com/dzuelke/8ef648676cab07f2a177/raw/.gitignore
git add composer.json .gitignore
git commit -m "composer plus wordpress prerequisites"
composer require ext-gd:* johnpbloch/wordpress wpackagist-plugin/amazon-web-services wpackagist-plugin/amazon-s3-and-cloudfront wpackagist-plugin/sendgrid-email-delivery-simplified
git add composer.json composer.lock
git commit -m "require ext-gd, wordpress and plugins"
You can’t perform that action at this time.