Skip to content

Instantly share code, notes, and snippets.

View uluumbch's full-sized avatar

Bachrul uluum uluumbch

View GitHub Profile
@uluumbch
uluumbch / how_to_create_number_formatting_livewire.md
Last active June 6, 2022 11:58
How to create number formatting(currency) in Laravel livewire powergrid

To add formating, just simply add closure to ->addColumn function

...
public function addColumns(): PowerGridEloquent{
->addColumn('column_name', function (Model $model){
                return "Rp".number_format($model->currency_table_name,0,',','.');
            })
            ...
@uluumbch
uluumbch / README.md
Created February 24, 2023 02:18
Auto Follow instagram account from list of link

this is just simple code using python and selenium library for auto following from list given.

Instalation

before using this code, make sure you have python installed and then install selenium using this command line. Open terminal then type: pip install selenium

Running

Last, run app.py and let the magic happen :)

@uluumbch
uluumbch / create.html
Created May 19, 2023 11:20
CRUD TEMPLATE BOOTSTRAP 5 WITH LOGIN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
@uluumbch
uluumbch / install_php_nginx.sh
Last active May 27, 2023 10:35
Cara install NGINX PHP Composer NPM dan Node JS di ubuntu
#!/bin/bash
# Update the system
sudo apt update
sudo apt upgrade -y
# Install PHP dependencies
sudo apt install -y software-properties-common
# Add the ondrej/php repository for PHP 8.2
@uluumbch
uluumbch / .htaccess
Created March 20, 2024 08:48
htaccess file for redirecting request to public folder. Used on Laravel project
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
@uluumbch
uluumbch / sendEmailToList.gs
Created May 21, 2024 12:16
Kirim email secara otomatis dari list di google sheets
function sendEmails() {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const dataRange = sheet.getRange("A3:B40");
const data = dataRange.getValues();
for (let i = 0; i < data.length; i++) {
const row = data[i];
const emailAddress = row[0];
const name = row[1];
const subject = `Informasi terkait Program Google Arcade Fasilitator 2024 oleh fasilitator`
@uluumbch
uluumbch / select.blade.php
Created August 26, 2024 03:14
Laravel Alpine Tailwind CSS Select with search. also has old and editable value
@props(['options', 'name', 'placeholder' => 'Select an option', 'value' => null, 'emptyOptionsMessage' => 'No results match your search.'])
<div class="mx-auto">
<div
x-data="select({ data: {{ json_encode($options) }}, name: '{{ $name }}', placeholder: '{{ $placeholder }}', value: '{{ $value }}', emptyOptionsMessage: '{{ $emptyOptionsMessage }}' })"
x-init="init()"
@click.away="closeListbox()"
@keydown.escape="closeListbox()"
class="relative"
>
<input type="hidden" x-model="value" name="{{ $name }}">
@uluumbch
uluumbch / dashboard.blade.php
Created September 26, 2024 03:05
Template dashboard tailwind css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Dashboard</title>
@vite('resources/css/app.css')
</head>
@uluumbch
uluumbch / guide.md
Last active December 13, 2024 02:34
print laravel.log with color highlighting on Ubuntu.

Method 1: Using ccze (Recommended)

Install ccze:

sudo apt update
sudo apt install ccze
@uluumbch
uluumbch / toast.blade.php
Created December 31, 2024 07:21
Alpine JS toast in laravel with tailwind. originate from devdojo.com/pines
{{-- located in views/resources/component/toast.blade.php --}}
<div class="relative w-auto h-auto" x-data>
<template x-teleport="body">
<ul
x-data="{
toasts: [],
toastsHovered: false,
expanded: false,
layout: 'default',
position: 'top-center',