This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^(00213|\+213|0)[(2)[0-9]{7}|(|5|6|7|9)[0-9]{9}]$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## CPU | |
[root@srv1 ~]# sysbench --test=cpu --cpu-max-prime=20000 run | |
WARNING: the --test option is deprecated. You can pass a script name or path on the command line without any options. | |
sysbench 1.0.17 (using system LuaJIT 2.0.4) | |
Running the test with following options: | |
Number of threads: 1 | |
Initializing random number generator from current time | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Ubuntu 18.04 dev Server | |
# Run like - bash install_lamp.sh | |
# Script should auto terminate on errors | |
echo -e "\e[96m Adding PPA \e[39m" | |
sudo add-apt-repository -y ppa:ondrej/apache2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
declare(strict_types=1); | |
namespace App\Providers; | |
use Auth; | |
use Domain\SentinelGuard; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media (min-width:320px) { /* smartphones, portrait iPhone, portrait 480x320 phones (Android) */ } | |
@media (min-width:480px) { /* smartphones, Android phones, landscape iPhone */ } | |
@media (min-width:600px) { /* portrait tablets, portrait iPad, e-readers (Nook/Kindle), landscape 800x480 phones (Android) */ } | |
@media (min-width:801px) { /* tablet, landscape iPad, lo-res laptops ands desktops */ } | |
@media (min-width:1025px) { /* big landscape tablets, laptops, and desktops */ } | |
@media (min-width:1281px) { /* hi-res laptops and desktops */ } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Browser::macro('assertSeeLinkWithHref', function ($link, $href) { | |
$message = "Did not see expected link [{$link}] with href [{$href}]."; | |
if ($this->resolver->prefix) { | |
$message .= " within [{$this->resolver->prefix}]."; | |
} | |
$anchor = $this->resolver->find("a[href$='{$href}']"); | |
$hasText = $anchor && (strpos($anchor->getText(), $link) !== false); | |
PHPUnit::assertTrue($anchor && $hasText, $message); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Laravel\Dusk\Browser; | |
use PHPUnit\Framework\Assert as PHPUnit; | |
Browser::macro('assertFind', function ($dom) { | |
$message = "Did not see expected element [{$dom}]."; | |
if ($this->resolver->prefix) { | |
$message .= " within [{$this->resolver->prefix}]."; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
explode(PHP_EOL, $string); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Shell script to get disk usage, cpu usage, RAM usage,system load,etc. | |
# from multiple Linux servers and output the information on a single | |
# server in html format. Read below for usage/installation info | |
# *--------------------------------------------------------------------* | |
# * ORIGINAL WORK BY: | |
# * dig_remote_linux_server_information.bash,v0.1 | |
# * Last updated on 25-Jul-2005* | |
# * Copyright (c) 2005 nixCraft project * | |
# * Comment/bugs: http://cyberciti.biz/fb/ * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this to your http {} of the nginx.conf file normally located at /etc/nginx/nginx.conf: | |
proxy_buffer_size 128k; | |
proxy_buffers 4 256k; | |
proxy_busy_buffers_size 256k; | |
Then add this to your php location block, this will be located in your vhost file look for the block that begins with location ~ .php$ { | |
fastcgi_buffer_size 128k; | |
fastcgi_buffers 4 256k; | |
fastcgi_busy_buffers_size 256k; |
NewerOlder