Skip to content

Instantly share code, notes, and snippets.


Michal Lohniský michallohnisky

View GitHub Profile
View gist:6703f7f39813d82bc3cfacf0b6b2f0a1
find . -name "*" -type "f" | xargs grep -P '(?=.*?isset)(?=.*?eval)(?=.*?\[\d+\])'
find . -name "*" -type "f" | xargs grep -P '<\?php\s+\$sF=[^\?]+\?>'
michallohnisky /
Created Sep 25, 2015 — forked from jbgo/
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
michallohnisky /
Last active Sep 18, 2015
Používané komponenty
View Utils.php
namespace App;
use Nette\Forms\Controls;
class Utils {
* Naformatuje cislo jako menu.
michallohnisky / functions.js
Last active Sep 18, 2015
JS funkce a komponenty
View functions.js
* Executing a function after the user has stopped typing for a specified amount
* of time. Usage:
* $('input').keyup(function() {
* delay(function(){
* alert('Time elapsed!');
* }, 1000 );
* });
var delay = (function(){