Skip to content

Instantly share code, notes, and snippets.

View MorrisJobke's full-sized avatar

Morris Jobke MorrisJobke

View GitHub Profile

Keybase proof

I hereby claim:

  • I am morrisjobke on github.
  • I am morrisjobke (https://keybase.io/morrisjobke) on keybase.
  • I have a public key whose fingerprint is 0D33 A6C4 3887 D75D 8285 7FB2 EF55 2587 D06F F0E9

To claim this, I am signing this object:

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MorrisJobke
MorrisJobke / sunday-open-bakery.geojson
Last active December 20, 2015 22:19
Sonntagsbäcker in Chemnitz
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
if [ -z "$2" ]; then
echo "Usage: ./add-domain.sh DOMAIN INTERNAL_URL"
exit 1;
fi
DOMAIN=$1
INTERNAL=$2
cp /etc/nginx/sites-available/TEMPLATE /etc/nginx/sites-available/$DOMAIN
@MorrisJobke
MorrisJobke / reverse-l10n.php
Last active June 29, 2016 10:06
Creates a po file from a (ownC|Nextc)loud JSON file in the server code. Call it like this: `php reverse-l10n.php de`
<?php
/**
* composer install gettext/gettext
*/
require 'vendor/autoload.php';
use Gettext\Translations;
$apps = [
/*
* add this as user style for URLs starting with http://adventofcode.com/2016/day/ in your browser
*/
body {
min-width: initial;
}
header {
white-space: initial;
}
@MorrisJobke
MorrisJobke / timelapse.md
Created December 23, 2016 13:28
Creating a timelapse out of an images series

Creating a timelapse out of an images series

Bring them into a common naming format (ordered by date):

jhead -n%Y-%m-%d.%H-%M-%S *.JPG

Create a timelapse video out of those images:

@MorrisJobke
MorrisJobke / sum.js
Created February 8, 2017 18:27
Sum up some values
$('[field="amount_usdollar"]')
.map(function(index, value){
return $(value)
.text()
.trim()
.replace(',', '')
.replace('€','');
})
.toArray()
.map(function(value){
@MorrisJobke
MorrisJobke / php.txt
Created November 28, 2017 10:23
PHP versions by linux distribtuion
Ubuntu 16.04 (xenial): 7.0 https://packages.ubuntu.com/xenial/php
Debian 9 (stretch): 7.0 https://packages.debian.org/stretch/php
SUSE Linux Enterprise Server 12: 7.0 https://scc.suse.com/docs/lifecycle/sle/12/modules (Web and Scripting Module)
CentOS/Red Hat 7: 5.4 http://mirror.centos.org/centos/7/os/x86_64/Packages
CentOS/Red Hat 7 with RHSCL: 7.1 https://developers.redhat.com/products/softwarecollections/updates/
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->