Skip to content

Instantly share code, notes, and snippets.

View meowmanijado's full-sized avatar
🦖

Meow meowmanijado

🦖
View GitHub Profile
<!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() }}">
@meowmanijado
meowmanijado / .gitignore
Created December 4, 2017 17:41
Remove node_modules directory
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove directory node_modules'
git push u
@meowmanijado
meowmanijado / flexbox.less
Created August 23, 2017 07:27 — forked from jayj/flexbox.less
CSS3 Flexbox - LESS Mixins
// --------------------------------------------------
// 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
@meowmanijado
meowmanijado / guide.md
Created July 26, 2017 12:05
Installing NGINX with PHP on CentOS 6

Installing NGINX with PHP on CentOS 6

Requirements
  • Fresh CentOS 6.8 64-bit
  • Root access
Initial steps
  1. Login to ssh using PuTTY (windows)
@meowmanijado
meowmanijado / http_referer_regex.php
Created July 20, 2017 05:27
Regex for http_referer
<?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]);
@meowmanijado
meowmanijado / strpos.php
Last active July 19, 2017 06:28
Created a function for strpos array
<?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;
}