Skip to content

Instantly share code, notes, and snippets.

Avatar

Michal Lohniský michallohnisky

View GitHub Profile
View gist:6703f7f39813d82bc3cfacf0b6b2f0a1
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 Sep 25, 2015 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted
View git-recover-branch.md

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 Sep 18, 2015
Používané komponenty
View Readme.md
View Utils.php
<?php
namespace App;
use Nette\Forms\Controls;
class Utils {
/**
* Naformatuje cislo jako menu.
@michallohnisky
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(){