Skip to content

Instantly share code, notes, and snippets.

View diki-haryadi's full-sized avatar
🎯
Focusing

Diki Haryadi diki-haryadi

🎯
Focusing
View GitHub Profile
@diki-haryadi
diki-haryadi / 𝐓𝐢𝐠𝐡𝐭-𝐂𝐨𝐮𝐩𝐥𝐢𝐧𝐠-vs-𝐋𝐨𝐨𝐬𝐞-𝐂𝐨𝐮𝐩𝐥𝐢𝐧𝐠.md
Created December 31, 2024 22:57
Mau liat contoh 𝐓𝐢𝐠𝐡𝐭 𝐂𝐨𝐮𝐩𝐥𝐢𝐧𝐠 vs 𝐋𝐨𝐨𝐬𝐞 𝐂𝐨𝐮𝐩𝐥𝐢𝐧𝐠 pake 𝐆𝐨𝐥𝐚𝐧𝐠?

𝐓𝐢𝐠𝐡𝐭 𝐂𝐨𝐮𝐩𝐥𝐢𝐧𝐠

Di contoh ini, UserService langsung terikat sama DataSource tertentu. Kalo kita mau ganti dari PostgreSQL ke MySQL misalnya, kita harus rombak banyak hal di UserService.

package main

import "fmt"

// DataSource contohnya "koneksi" ke DB tertentu
type DataSource struct {
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"google.golang.org/api/option"
"google.golang.org/api/sheets/v4"
@bmwalters
bmwalters / arch-linux-32-bit-chroot.md
Last active December 11, 2023 07:19
Creating a 32-bit Arch Linux chroot

on the host system

  1. Download an iso
  2. mkdir mounted-iso mounted-root root live
  3. sudo mount -o loop archlinux-2020.06.01-i686.iso mounted-iso/
  4. sudo mount -t squashfs mounted-iso/arch/i686/airootfs.sfs mounted-root/
  5. sudo cp -av mounted-root/. root/
  6. sudo umount mounted-root
  7. sudo umount mounted-iso
  8. sudo mount -o bind root live/
  9. sudo arch-chroot live bash
@diki-haryadi
diki-haryadi / List.md
Created July 19, 2019 08:01 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

@adxio
adxio / wa_rotator.html
Last active September 8, 2019 14:34
Simple rotator wa,
<html>
<div id="product_name">Kacamata</div>
<div id="product_group">Fashion</div>
<div id="product_id">10</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script language="JavaScript">
var product_id = $('#product_id').text()
var product_name = $('#product_name').text()
var product_group = $('#product_group').text()
var phone = ['6281312020954','6281312020941','6281312020938']
@rsudip90
rsudip90 / nullHandle.go
Last active September 5, 2024 15:29
How I handled the null possible value in a sql database row in golang?
package main
import (
"database/sql"
"encoding/json"
"fmt"
"reflect"
"time"
"github.com/go-sql-driver/mysql"
@manoj23
manoj23 / ubuntu-on-archlinux-using-lxc.md
Last active January 26, 2024 01:22
Install Ubuntu containers on Archlinux using LXC

Install Ubuntu containers on Archlinux using LXC

Install the lxc and the debootstrap packages:

# pacman -Sy lxc debootstrap 

Install an Ubuntu container

I will install Ubuntu 16. Therfore, I will use the xenial release.

@msurguy
msurguy / List.md
Last active June 30, 2025 00:13
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):