Skip to content

Instantly share code, notes, and snippets.

View dikotiledon's full-sized avatar

Riandi Kartiko dikotiledon

View GitHub Profile
netsh advfirewall firewall add rule name="Open Port 8000" dir=in action=allow protocol=UDP localport=80 remoteport=any
@dikotiledon
dikotiledon / Laravel-Scheduler-Windows.md
Created December 19, 2024 06:28 — forked from Splode/Laravel-Scheduler-Windows.md
Laravel Scheduler on Windows

Run Laravel Scheduled Tasks on Windows

The following are instructions for running scheduled tasks defined in a Laravel project on Windows. The Laravel documentation provides instructions for running scheduled tasks using cron jobs on Linux systems. However, cron jobs are not available on Windows. The built-in Windows Task Scheduler can be used to run scheduled tasks instead.

Create a Scheduled Task

  1. Open Task Scheduler
  2. Select Create Task...
  3. Give the task a name and description
  4. To run the task in the background, select Run whether the user is logged on or not and check the Hidden checkbox.

kambing ui

Debian sid

deb http://kambing.ui.ac.id/debian/ sid main contrib non-free

Debian testing

deb http://kambing.ui.ac.id/debian/ testing main contrib non-free
deb http://kambing.ui.ac.id/debian/ testing-updates main contrib non-free
deb http://kambing.ui.ac.id/debian-security/ testing/updates main main contrib non-free
Activate debug mode in Android
Connect to PC via USB
Open command prompt type: adb tcpip 5555
Disconnect your tablet or smartphone from pc
Open command prompt type: adb connect IPADDRESS (IPADDRESS is the DHCP/IP address of your tablet or smartphone, which you can find by Wi-Fi -> current connected network)
# Buttery powered state
adb shell dumpsys battery | grep powered
# Unplug battery
adb shell dumpsys battery unplug
# Reset battery
adb shell dumpsys battery reset
# Dump Doze mode info
@dikotiledon
dikotiledon / laravel_horizon.md
Created July 21, 2022 16:29 — forked from ankurk91/laravel_horizon.md
Laravel Horizon, redis-server, supervisord on Ubuntu 20 server

Laravel Horizon, redis-server, supervisord on Ubuntu server

Laravel 8+, Horizon 5.x, Redis 6.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

@dikotiledon
dikotiledon / autossh
Last active June 6, 2022 20:34
autossh multiple tunnels
# Source function library
. /etc/init.d/functions
RETVAL=0
prog="autossh"
autossh="/usr/bin/autossh"
[ ! -d /var/run/$prog ] && mkdir -p /var/run/$prog
start() {
@dikotiledon
dikotiledon / default.txt
Last active June 3, 2022 06:49
laravel with nginx in subdirectory
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.php;
server_name _;
@dikotiledon
dikotiledon / .htaccess
Created April 8, 2022 20:57 — forked from peruukki/.htaccess
Redirect traffic silently to a subdirectory under Apache document root
# Problem:
# You want to serve two sites, example1.com and example2.com, but your hosting service doesn't support
# virtual hosts, so you need to use the same document root for both of them. Or you just need to redirect
# traffic to a certain URL to a subdirectory under the document root.
#
# Solution:
# Put your site/files in a subdirectory under the document root and redirect the traffic there behind the scenes.
# Below is an example configuration for the URL example1.com and the subdirectory "example1".
#
@dikotiledon
dikotiledon / BCA_API.php
Created December 19, 2021 19:47 — forked from dertajora/BCA_API.php
This is my code when learn to use BCA API for my office. This code only works on Sandbox environment and there is no confidential information here. FYI, based on my experience if you want to implement this code using real environment of BCA API, you need to do some UAT with BCA side.
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class BCAAPI extends MY_Controller {
function __construct(){
$this->api_key = "YOUR API KEY";
$this->api_secret = "YOUR API SECRET";
$this->client_id = "YOUR CLIENT ID";