Skip to content

Instantly share code, notes, and snippets.

View endrureza's full-sized avatar
🎯
Focusing

Endru Reza endrureza

🎯
Focusing
View GitHub Profile
@endrureza
endrureza / removeJobsRedisDriver.php
Created June 23, 2019 17:52 — forked from derhansen/removeJobsRedisDriver.php
Laravel 5 - remove all jobs from a queue (redis driver)
Redis::connection()->del('queues:myqueue');
@endrureza
endrureza / git_empty_branch
Created June 6, 2019 10:35 — forked from j8/git_empty_branch
Create new branch with empty folder structure
You can create a new empty branch like this:
$ git checkout --orphan NEWBRANCH
--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.
The --orphan command keeps the index and the working tree files intact in order to make it convenient for creating a new history whose trees resemble the ones from the original branch.
Since you want to create a new empty branch that has nothing to do with the original branch, you can delete all files in the new working directory:
@endrureza
endrureza / rand-between.sql
Created June 6, 2018 07:32
Mysql Rand Between Number
ROUND((RAND() * (max-min))+min)
@endrureza
endrureza / voyager.php
Created April 23, 2017 04:22
Config for voyager
<?php
return [
/*
|--------------------------------------------------------------------------
| User config
|--------------------------------------------------------------------------
|
| Here you can specify voyager user configs
|
@endrureza
endrureza / nginx.vh
Created October 4, 2016 17:53
Not Working VH Nginx
server {
listen 80;
server_name scheduling.dev;
root /var/www/html/scheduling/public;
index index.php index.html index.htm;
# serve static files directly
@endrureza
endrureza / nginx.vh
Created October 4, 2016 17:48
Refix Virtualhost Create for Nginx
server {
listen 80;
listen [::]:80;
server_name scheduling.dev;
root /var/www/html/scheduling/public;
index index.php index.html index.htm;
@endrureza
endrureza / TestController.php
Created June 15, 2016 08:11
Buat Update Balance
$order_temporaries = DB::table('order_temporary_tb')
->distinct('bidan_id')
->select('order_temporary_tb.bidan_id as bidan','order_temporary_tb.id as id')
->where(function($query){
$query->where('status','0')
->where('status','1')
->where('status','3');
})
->get();