Skip to content

Instantly share code, notes, and snippets.

Petr Knap petrknap

Block or report user

Report or block petrknap

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
#!/usr/bin/env sh
# Don't forget to:
# 1. make `/etc/letsencrypt` persistent
# 2. share `/tmp/letsencrypt` as ``
set -e
set -x
which certbot-auto || (
petrknap / .gitignore
Last active Mar 17, 2017
Simple semaphore object for JS
petrknap / .gitignore
Last active Dec 2, 2016
Elasticsearch sandbox
View .gitignore
petrknap / .gitignore
Last active Sep 1, 2016
PHPOffice/PHPWord: MsDoc - Czech language support #881
View PlaylistGenerator.php
namespace PetrKnap\Gist;
use DirectoryIterator;
use SplFileInfo;
class PlaylistGenerator
const TYPE_M3U = "m3u";
petrknap / icon.png
Last active Apr 20, 2018
Pomodoro timer for zenity
petrknap / phpunit.macro
Created Jan 7, 2016
Bash macro for batch running of PHPUnit
View phpunit.macro
#!/usr/bin/env bash
phpunit() {
for D in `find . -type f -name "phpunit.xml" -printf "%h\n"`
cd "$D"
echo "${PWD}"
command phpunit "$@"
petrknap / .gitignore
Last active Dec 2, 2016
JS function which returns active device detected by Bootstrap
You can’t perform that action at this time.