Skip to content

Instantly share code, notes, and snippets.

View joundy's full-sized avatar

joundy

View GitHub Profile
@joundy
joundy / main.go
Created July 3, 2024 19:23
Golang race condition example
package main
import (
"fmt"
"runtime"
"sync"
)
type SC struct {
m sync.Mutex
@joundy
joundy / main_1.rs
Last active July 3, 2024 19:26
thread-vs-process-ppt
use core::time;
use std::thread::{self, sleep};
fn fn_loop(id: u8) {
loop {
println!("fn_loop: {}", id);
sleep(time::Duration::from_secs(1))
}
}

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@joundy
joundy / gulpfile.js
Created January 2, 2021 17:03 — forked from dasilvaluis/gulpfile.js
Gettext Scanner Gulp Script for Twig Projects
/**
* Gettext Scanner Script for Twig Projects
* v1.3
*
* Developed by Luís Silva
* https://github.com/luism-s
*/
/**
* Purpose:
const one = () => {
const char = ["A", "M", "I", "N", "G", "A", "N", "T", "E", "N", "G"]
const bg = "-"
// buat gambar blank
// biar gampang buat array kosong dulu
let image = new Array(char.length)
for (var i = 0; i < image.length; i++) {
image[i] = new Array(char.length);
}