Skip to content

Instantly share code, notes, and snippets.

View michallohnisky's full-sized avatar

Michal Lohniský michallohnisky

View GitHub Profile
Nalezení:
find . -name "*" -type "f" | xargs grep -P '(?=.*?isset)(?=.*?eval)(?=.*?\[\d+\])'
Odstranění:
find . -name "*" -type "f" | xargs grep -P '<\?php\s+\$sF=[^\?]+\?>'
@michallohnisky
michallohnisky / git-recover-branch.md
Created September 25, 2015 06:21 — forked from jbgo/git-recover-branch.md
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
michallohnisky / Readme.md
Last active September 18, 2015 06:09
Používané komponenty
@michallohnisky
michallohnisky / Utils.php
Created September 18, 2015 05:43
PHP funkce
<?php
namespace App;
use Nette\Forms\Controls;
class Utils {
/**
* Naformatuje cislo jako menu.
@michallohnisky
michallohnisky / functions.js
Last active September 18, 2015 05:44
JS funkce a komponenty
/**
* 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(){