- Fresh CentOS 6.8 64-bit
- Root access
- Login to ssh using PuTTY (windows)
| <!DOCTYPE html> | |
| <html lang="{{ app()->getLocale() }}"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <!-- CSRF Token --> | |
| <meta name="csrf-token" content="{{ csrf_token() }}"> |
| #add 'node_modules' to .gitignore file | |
| git rm -r --cached node_modules | |
| git commit -m 'Remove directory node_modules' | |
| git push u |
| // -------------------------------------------------- | |
| // Flexbox LESS mixins | |
| // The spec: http://www.w3.org/TR/css3-flexbox | |
| // -------------------------------------------------- | |
| // Flexbox display | |
| // flex or inline-flex | |
| .flex-display(@display: flex) { | |
| display: ~"-webkit-@{display}"; | |
| display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox |
| <?php | |
| // get host name from URL | |
| preg_match('@^(?:http://)?(?:https://)?([^/]+)@i', | |
| $_SERVER['HTTP_REFERER'], $matches); | |
| $hosts = $matches[1]; | |
| // get last two segments of host name | |
| preg_match('/[^.]+\.[^.]+$/', $hosts, $matches); | |
| var_dump($matches[0]); |
| <?php | |
| // Function for array user agent check | |
| function strposa ($haystack, $needle, $offset=0) { | |
| if (!is_array($needle)) $needle = array($needle); | |
| foreach ($needle as $query) { | |
| if (strpos($haystack, $query, $offset) !== false) return true; | |
| } | |
| return false; | |
| } |