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
[ | |
{ | |
"name": "New Years Day", | |
"date": "01/01/2017", | |
"states": [ | |
"Kuala Lumpur", | |
"Labuan", | |
"Malacca", | |
"Negeri Sembilan", | |
"Pahang", |
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
import android.content.Context; | |
import android.location.Address; | |
import android.location.Geocoder; | |
import java.io.IOException; | |
import rx.Observable; | |
import rx.Subscriber; | |
import rx.android.schedulers.AndroidSchedulers; | |
import rx.schedulers.Schedulers; |
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 | |
namespace App\Http\Controllers; | |
use Illuminate\Foundation\Bus\DispatchesJobs; | |
use Illuminate\Routing\Controller as BaseController; | |
use Illuminate\Foundation\Validation\ValidatesRequests; | |
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; | |
use Illuminate\Validation\Validator; |
The easiest way to get the ClamAV package is using Homebrew
$ brew install clamav
Before trying to start the clamd
daemon, you'll need a copy of the ClamAV databases.
Inside /your/location/to/brew/etc/clamav, you'll see 2 files:
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 | |
namespace App\Commands\Database; | |
use Illuminate\Support\ServiceProvider; | |
class BindDatabaseServiceProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ |
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
#laravel | |
alias pa="php artisan" | |
#git | |
alias gi="git init" | |
alias gs="git status" | |
alias ga="git add" | |
alias gc="git commit -m" | |
alias gac="git add .;git commit -m" | |
alias gp="git push" |
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 | |
if (!function_exists('abbrv')) { | |
function abbrv($value) | |
{ | |
$removeNonAlphanumeric = preg_replace("/[^A-Za-z0-9 ]/", '', $value); | |
$removeVowels = str_replace( | |
['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', ' '], | |
'', | |
$removeNonAlphanumeric); |
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 | |
/** | |
* I use abbrv() function in https://gist.github.com/nasrulhazim/df8f4046cceb37ab61fa5d5c0c65dba6 | |
* And for str_random() from Laravel Framework | |
**/ | |
if (!function_exists('generate_reference_number')) { | |
function generate_reference_number($module_label, $module_component = null) | |
{ | |
if (empty($module_label)) { |
When setting these options consider the following:
- How long is your average request?
- What is the maximum number of simultaneous visitors the site(s) get?
- How much memory on average does each child process consume?
sudo grep max_children /var/log/php?.?-fpm.log.1 /var/log/php?.?-fpm.log