Skip to content

Instantly share code, notes, and snippets.

View JanMikes's full-sized avatar
🚀
Peon.dev, MySpeedPuzzling.com

Jan Mikeš JanMikes

🚀
Peon.dev, MySpeedPuzzling.com
View GitHub Profile
@JanMikes
JanMikes / gist:9958af45b71da4848b649873ac7138a0
Created December 20, 2016 20:52
./certbot-auto errors output
root@debian7:~# ./certbot-auto certonly --webroot -w /var/www/cz.directa.com/www -d cz.directa.com -d cs.directa.com -d ru.directa.com
Bootstrapping dependencies for Debian-based OSes...
Hit:1 http://packages.dotdeb.org wheezy-php56 InRelease
Hit:2 http://security.debian.org stretch/updates InRelease
Hit:3 http://ftp.u-picardie.fr/mirror/debian wheezy-backports InRelease
Hit:4 http://ftp.it.debian.org/debian stretch InRelease
Hit:5 http://ftp.it.debian.org/debian stretch-proposed-updates InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
@JanMikes
JanMikes / Article1.php
Last active November 28, 2016 21:36
Draft of possible immutable append-only entities
<?php
class Article
{
/** @var \DateTime */
private $createdAt;
/** @var ArticleHistory[] */
private $historyChanges;
var didScroll = false;
$(window).scroll(function() {
didScroll = true;
});
setInterval(function() {
if ( didScroll ) {
didScroll = false;
@JanMikes
JanMikes / grayscale.js
Last active August 29, 2015 13:57
Very simple jquery script, that adds grayscale filter to your images with class "grayscale". On image hover or parents <a> tag hover image turns into original version using CSS3 transitions. Requires browser with HTML5 support (using 2d canvas).
// jQuerys default .load() is unreliable in WebKit browsers as is said in documentation
$.fn.imageLoad = function(fn){
this.load(fn);
this.each( function() {
if ( this.complete && this.naturalWidth !== 0 ) {
$(this).trigger('load');
}
});
}