Skip to content

Instantly share code, notes, and snippets.

View satriyop's full-sized avatar
🏠
Working from home

satriyop

🏠
Working from home
View GitHub Profile
@satriyop
satriyop / txt
Created November 25, 2020 19:21 — forked from DeployIsComing/txt
Installing XDEBUG in PHP 7.4 - MacOS - brew
$ pecl install xdebug
$ vim /usr/local/etc/php/7.2/php.ini
Remove the line
zend_extension=xdebug.so
$ vim /usr/local/etc/php/7.4/conf.d/ext-xdebug.ini
Add the line:
zend_extension="/usr/local/Cellar/php/7.4.4/pecl/20190902/xdebug.so
@satriyop
satriyop / laravel_horizon.md
Created April 29, 2020 13:45 — forked from ankurk91/laravel_horizon.md
Laravel Horizon, redis-server, supervisord on Ubuntu server

Laravel Horizon, redis-server, supervisord on Ubuntu 16/18 server

Laravel 6.0, Horizon 3.x, Redis 5.x

Parepare application

  • Install and configure Laravel Horizon as instructed in docs
  • Make sure you can access the Horizon dashboard like - http://yourapp.com/horizon
  • For now it should show status as inactive on dashbaord

Install redis-server

@satriyop
satriyop / Postman POST PUT Requests.txt
Created April 11, 2020 18:52 — forked from ethanstenis/Postman POST PUT Requests.txt
How to make Postman work with POST/PUT requests in Laravel...
To make Postman work with POST/PUT requests...
https://laravel.com/docs/5.2/routing#csrf-x-csrf-token
In addition to checking for the CSRF token as a POST parameter, the Laravel VerifyCsrfToken middleware will also check for the X-CSRF-TOKEN request header.
1. Store the token in a "meta" tag at the top of your root view file (layouts/app.blade.php)...
<meta name="csrf-token" content="{{ csrf_token() }}">
** If using jQuery, you can now instruct it to include the token in all request headers.
$.ajaxSetup({
@satriyop
satriyop / zsh_history_fix.sh
Created April 9, 2020 02:10
fix zsh history corrupt
#!/usr/bin/env zsh
# George Ornbo (shapeshed) http://shapeshed.com
# License - http://unlicense.org
#
# Fixes a corrupt .zsh_history file
mv ~/.zsh_history ~/.zsh_history_bad
strings ~/.zsh_history_bad > ~/.zsh_history
fc -R ~/.zsh_history
rm ~/.zsh_history_bad
@satriyop
satriyop / 00_etc-hosts.md
Created March 26, 2020 20:19 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo, Reddit, and Imgur.

Unblock Vimeo, Reddit, Imgur, dan Netflix

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows