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