Skip to content

Instantly share code, notes, and snippets.

View cakmalik's full-sized avatar
🌴
On vacation

M. Hasin Ilmalik cakmalik

🌴
On vacation
View GitHub Profile
@cakmalik
cakmalik / install_webserver.sh
Created May 7, 2025 23:26
Install complete webserver for arch
#!/bin/bash
echo "🚀 Memulai proses instalasi PHP, MariaDB, dan Web Server di Arch Linux..."
# Update sistem terlebih dahulu
echo "🔄 Memperbarui sistem..."
sudo pacman -Syu --noconfirm
# 1. Instal PHP dan ekstensi penting
echo "📦 Menginstal PHP dan ekstensi umum..."
@cakmalik
cakmalik / clear_webserver_for_arch.sh
Created May 7, 2025 23:26
Clear webserver for Arch
#!/bin/bash
echo "🚨 Mulai proses penghapusan PHP, Web Server, dan MySQL dari sistem Anda..."
# Fungsi bantu hapus paket jika ditemukan
remove_pkg() {
local pattern="$1"
local pkgs=$(pacman -Qq | grep -E "$pattern")
if [[ -n "$pkgs" ]]; then
echo "🧹 Menghapus paket: $pattern ..."
@cakmalik
cakmalik / hapus_webserver_php.sh
Created May 7, 2025 09:47
script for delete Webserver and Php for Arch Linux
#!/bin/bash
echo "🚨 Mulai proses penghapusan PHP, Web Server, dan MySQL dari sistem Anda..."
# 1. Hapus PHP dari pacman (repo resmi)
echo "🧹 Menghapus PHP dari pacman..."
sudo pacman -Rns --noconfirm $(pacman -Qsq php) 2>/dev/null
# 2. Hapus Web Server: Apache & Nginx
echo "🧹 Menghapus Web Server (Apache dan Nginx)..."
@cakmalik
cakmalik / NvChad.md
Created November 16, 2024 17:37 — forked from kashifulhaque/NvChad.md
Neovim stuff with NvChad

Neovim keybinds

  • Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
  • _ (underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)
    • 0 (zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
  • $ (dollar) to move the cursor at the end of line (doesn't switch to insert mode)
  • d$ will delete from wherever your cursor is till the end of the line
  • f<character> to move cursor to the first occurrence of <character>
    • f( to move cursor to first occurence of (
  • t<character> to move cursor to upto but not on the first occurrence of <character>
  • t( to move cursor to first occurence of (
@cakmalik
cakmalik / Dive Deeper Laravel Filament.md
Last active November 3, 2024 22:59
Dive Deeper Laravel Filament

FILAMENT UNCOVER

This is just for personal records. Thank you for reading it



1. Hiding components based on the current operation

@cakmalik
cakmalik / Firebase Messaging Service.md
Last active October 30, 2024 08:22
Contoh Pembuatan Service untuk Firebase Messaging Laravel

Buat Model dan Migration

untuk Menyimpan Token kita perlu membuat migrasi dan model. bisa dengan command seperti berikut

php artisan make:model FirebaseAuthToken -m

Setelah dibuat. buka file nya dan sesuaikan seperti berikut

 public function up(): void

Contoh Penerapan Login dengan Google Via API (Alternatif selain Socialite)

  1. Install
composer require google/apiclient
  1. Gunakan

Open File App\Providers\AppServiceProvider

Change method boot

use Carbon\Carbon;


public function boot()
{
	config(['app.locale' =&gt; 'id']);
<?php
namespace App\Http\Livewire\Stats;
use Illuminate\Support\Facades\DB;
use Livewire\Component;
class DistanceByYear extends Component
{
public $chartId;
@cakmalik
cakmalik / gist:63464420bae50832420235895af7a7df
Last active September 11, 2023 07:16
Tailwind Css Datatable
<div>
<section class="mt-10">
<div class="mx-auto max-w-screen-xl px-4 lg:px-12">
<!-- Start coding here -->
<div class="bg-white dark:bg-gray-800 relative shadow-md sm:rounded-lg overflow-hidden">
<div class="flex items-center justify-between d p-4">
<div class="flex">
<div class="relative w-full">
<div class="absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none">
<svg aria-hidden="true" class="w-5 h-5 text-gray-500 dark:text-gray-400"