Skip to content

Instantly share code, notes, and snippets.

@damour
damour / gist:4959422
Last active December 13, 2015 18:58
Регулярное выражение правильность украинских номеров (моб и городской 7-значный) PHP, javascript thanks http://habrahabr.ru/users/Kindman/
preg_match("/(?<!\w)(?:(?:(?:(?:\+?3)?8\W{0,5})?0\W{0,5})?[34569]\s?\d[^\w,;(\+]{0,5})?\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d(?!(\W?\d))/x", $_POST['tel'], $output_array)
if (/(\w)(?:(?:(?:(?:\+?3)?8\W{0,5})?0\W{0,5})?[34569]\s?\d[^\w,;(\+]{0,5})?\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d\W{0,5}\d(?!(\W?\d))/.test($('#phone').val()) == false)
@damour
damour / gist:4772699
Created February 12, 2013 19:37
Laravel 4 docs to pdf
git clone git://github.com/laravel/docs.git
cd docs
cat * > all.md
gimli -f all.md
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script>
var $ = jQuery.noConflict();
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
var jq17 = jQuery.noConflict();
</script>
@damour
damour / Bootstrap vs jquery
Created February 3, 2013 08:07
Bootstrap v 2.2.2
<script type='text/javascript'>
$.fn.bootstrapBtn = $.fn.button.noConflict();
</script>