Skip to content

Instantly share code, notes, and snippets.

View bendo01's full-sized avatar

Benny Leonard Enrico Panggabean bendo01

View GitHub Profile
@Sharifur
Sharifur / how to install posges sql 16
Created June 5, 2024 10:49
How to Install PostgreSQL 16 on AlmaLinux
https://www.liquidweb.com/kb/install-postgresql-almalinux/
Install PostgreSQL on AlmaLinux
If you have never installed PostgreSQL on Linux before, or this is your first time using AlmaLinux, don’t worry. Just follow our easy five-step guide to get PostgreSQL running in no time.
Step #1: Update AlmaLinux
Before you install PostgreSQL on Linux, you should first make sure that your distribution has the latest packages installed. To do this, you need to use the dnf command, which will automatically update any outdated packages.
dnf update -y
@MatinMN
MatinMN / Laravel Alpine JS Modal
Last active October 24, 2024 18:01
Laravel Modal Component
// open modal from livewire component
$this->dispatch('open-modal', name: 'user-details');
// close modal
$this->dispatch('close-modal');
@cmer
cmer / LICENSE
Last active October 21, 2024 00:43
Tom-Select.js Tailwind UI theme
Copyright 2023 Carl Mercier
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHE
@tatsuyasusukida
tatsuyasusukida / !README-javascript-media-video.md
Last active November 4, 2024 11:42
🎥 How to record a video with JavaScript [demo video available]

🎥 How to record a video with JavaScript [demo video available]

Demo video: How to record a video with JavaScript

About this article

This article describes how to shoot a video from JavaScript using the MediaStream Recording API. The related resources are shown below.

@uint0
uint0 / Cargo.toml
Created July 14, 2021 12:39
Rust File Upload
[package]
name = "file-receiver"
version = "0.1.0"
authors = ["uint0 <uint0@zeta-mechanic>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
actix-web = "3"
@oschannel
oschannel / pyenv_basics_cheatsheet.md
Last active April 17, 2022 09:16
PYENV BASICS CHEATSHEET | by OsChannel.com

Watch a video tutorial about below on OsChannel.com: https://youtu.be/WVISFQpstJE

PyEnv Basics Cheatsheet Contains:

  • Installation of PyEnv.
  • Installation of Multiple Python versions including a macOS Fix.
  • Setting Different Python versions for your Projects using multiple ways.
  • Swiching between Python Versions using PyEnv.

To Install pyenv:

@mithicher
mithicher / tom-select.blade.php
Last active October 25, 2024 19:29
Tom Select Livewire Blade Component
/* Component Usage
// Data for options
$users = \App\User::limit(6)->get()->transform(fn($user) => [
'id' => $user->id,
'title' => $user->name,
'subtitle' => $user->email
]);
// Usage in view
@giuliano-macedo
giuliano-macedo / download_file.rs
Last active October 25, 2024 17:13
Download large files in rust with progress bar using reqwest, future_util and indicatif
// you need this in your cargo.toml
// reqwest = { version = "0.11.3", features = ["stream"] }
// futures-util = "0.3.14"
// indicatif = "0.15.0"
use std::cmp::min;
use std::fs::File;
use std::io::Write;
use reqwest::Client;
use indicatif::{ProgressBar, ProgressStyle};
@tumainimosha
tumainimosha / page-info.ts
Last active September 18, 2024 08:18
NestJS Graphql Cursor Based pagination
import { ObjectType, Field } from "@nestjs/graphql";
@ObjectType()
export class PageInfo {
@Field({ nullable: true })
startCursor: string;
@Field({ nullable: true })
endCursor: string;
@tanthammar
tanthammar / session-timeout-alert-after-livewire-scripts.blade.php
Last active November 23, 2023 11:50
Laravel Livewire Turbolinks Blade component to keep session alive
{{-- You do not need to add this component if you are using the permanent option in the head component --}}
<script>
if (!window.sessionTimerPermanent && window.Livewire) {
window.livewire.hook('afterDomUpdate', startSessionTimer)
}
// if you are on livewire > 1.3.1 and want to avoid the default error alert
// https://github.com/livewire/livewire/pull/1146
window.livewire.onError(statusCode => {
if (statusCode === 419) {