Skip to content

Instantly share code, notes, and snippets.

View kvz's full-sized avatar

Kevin van Zonneveld kvz

View GitHub Profile
@kvz
kvz / strace-identify-list-delegate.sh
Last active August 29, 2015 13:57
When I run `identify -list delegate` it shows my delegates, but then exits with "Aborted (core dumped)"
# I statically compiled Imagemagick.
# Converting works well so far.
# But when I run `identify -list delegate` it shows my delegates, but then exits with "Aborted (core dumped)".
# What could be wrong here?
$ strace -f identify -list delegate
execve("./target/bin/identify", ["identify", "-list", "delegate"], [/* 21 vars */]) = 0
brk(0) = 0x34e2000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8452cd8000
"steps": {
"ipad": {
"robot" : "/video/encode",
"use" : [ ":original" ],
"preset": "ipad"
},
"webm": {
"robot" : "/video/encode",
"use" : [ ":original" ],
"preset": "webm"
cd /tmp
wget -nc https://www.dropbox.com/s/04u5xws6fkvbkgb/Shred_Those_Pounds.mp4?dl=1 -O Shred_Those_Pounds.mp4
echo ""
echo ""
echo "--> Failure with '-sn -dn'"
ffmpeg-v2.2.3 \
-i ./Shred_Those_Pounds.mp4 \
-codec:a libfdk_aac \
#!/usr/bin/env bash
# Transloadit API2. Copyright (c) 2015, Transloadit Ltd.
#
# This file
# - Reproduces the issue where resizing a certain jpg breaks
# the image on OSX & iOS, wheras the original dispays fine.
#
# Reported first by Richard Taylor in http://support.transloadit.com/discussions/questions/96479-image-conversion-problem
#
# Typically called as `./debug.sh [target.jpg]`
#!/bin/bash
set -x
mp3="/data/music/music/!Frank!/CD1/007 Mixed By Dave Seaman.mp3"
mp3="/data/music/music/!House!/Progressive/Sander Kleinenberg/This Is Everybody Too CD1.mp3"
outbase="gourcedump"
getavatars="1"
#resolution="640x480"
resolution="800x600"
# http://nullkey.ath.cx/projects/glc/wiki/HowtoInstall
#!/usr/bin/perl
#fetch Gravatars
use strict;
use warnings;
use LWP::Simple;
use Digest::MD5 qw(md5_hex);
my $size = 90;
@kvz
kvz / default.nginx
Created November 30, 2010 12:35
A default Nginx config file that will server any (cake) php site in /var/www/*
server {
listen 80 default;
server_name _;
set $site $host;
if ($site ~ "^(w{3}\.)?(.*)$") { set $site $2; }
set $root /var/www/$site;
if (-d /var/www/www.$site) { set $root /var/www/www.$site; }
if (!-d $root) { rewrite ^(.*)$ http://decomissioned.plutonia.nl$1 break; }
@kvz
kvz / gist:740269
Created December 14, 2010 10:55
LinkedIn
Dear Kevin van Zonneveld,
In order to ensure that you continue to have the best experience using LinkedIn, we are constantly monitoring our site to make sure your account information is safe.
We have recently disabled your account for security reasons. To reset your password, follow these quick steps:
Go to the LinkedIn website
Click on "Sign In"
Click on "Forgot Password?" and follow the directions on the website
Thank you,
@kvz
kvz / Who_needs_foreach_anyway.php
Created April 12, 2011 10:34
Groups nested hour registration data & sums up the total overage in 2011 per customer
<?php
// Thank you CakePHP Set::combine() & PHP5.3 : )
// http://book.cakephp.org/view/1492/combine
$cust_overage = array_map(function ($regs) {
return array_sum($regs);
}, Set::combine(
$this->Hour->overage(2011),
'/Hour/id',
'/Hour/amount',
'/Hour/customer_id'