Skip to content

Instantly share code, notes, and snippets.

View ryanbekhen's full-sized avatar
🇮🇩
Indonesia

ACHMAD IRIANTO EKA PUTRA ryanbekhen

🇮🇩
Indonesia
View GitHub Profile
@ryanbekhen
ryanbekhen / superset-install.sh
Last active June 30, 2024 17:02
Instant Installation Apache Superset
#!/bin/bash
SUPERSET_DIR=~/superset
sudo apt-get update -y # update package
sudo apt-get install build-essential libssl-dev libffi-dev python-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev -y # install package
sudo apt-get install python3-pip python3.10-venv -y # install package
[ ! -d $SUPERSET_DIR ] && mkdir $SUPERSET_DIR
@ryanbekhen
ryanbekhen / docker-compose.yaml
Created February 13, 2023 07:19 — forked from natcl/docker-compose.yaml
Docker Compose Syslog Example
version: '2'
services:
nodered:
image: nodered/node-red-docker:0.17.5
restart: always
environment:
- TZ=America/Montreal
logging:
driver: syslog
options:
@ryanbekhen
ryanbekhen / main.go
Created February 12, 2023 00:14 — forked from hnakamur/main.go
A go example to stop a worker goroutine when Ctrl-C is pressed (MIT License)
package main
import (
"fmt"
"os"
"os/signal"
"time"
"golang.org/x/net/context"
)
@ryanbekhen
ryanbekhen / rsa_util.go
Created August 13, 2022 21:18 — forked from miguelmota/rsa_util.go
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@ryanbekhen
ryanbekhen / example.service.ts
Created January 19, 2022 09:15
Example remove failed queue Nest.js from service
import { InjectQueue } from '@nestjs/bull';
import { Injectable } from '@nestjs/common';
@Injectable()
export class ExampleService {
constructor(
@InjectQueue('simpool') private readonly exampleQueue: Queue
) {}
@ryanbekhen
ryanbekhen / CleanCodeBranchingIF.java
Created January 22, 2018 00:39
Clean code branching if condition
if (Score > 80) {
VirtualMoneyPrice = 1000;
} else if (Score > 40) {
VirtualMoneyPrice = 400;
} else if (Score > 30) {
VirtualMoneyPrice = 100;
}
@ryanbekhen
ryanbekhen / BadCodeBranchingIF.java
Created January 22, 2018 00:37
Bad code branching If condition
if (Score > 80) {
VirtualMoneyPrice = 1000;
}
if (Score > 40) {
VirtualMoneyPrice = 400;
}
if (Score > 30) {
VirtualMoneyPrice = 100;
}
@ryanbekhen
ryanbekhen / CleanCodeVariableName.java
Created January 22, 2018 00:34
Clean code variable name
double Length, Width, Height;
@ryanbekhen
ryanbekhen / BadCodeVariableName.java
Created January 22, 2018 00:33
Bad code variable name
double l, w, h;
@ryanbekhen
ryanbekhen / CleanCodeCreatorComment.java
Created January 22, 2018 00:28
Clean code creator comment
// Author: Achmad Irianto Eka Putra
// Since : 22/01/18
// or use JavaDoc
/**
* A class to get information of application
* @author Achmad Irianto Eka Putra (ryanbekhen@gmail.com)
* @version 1.0
* @since 22/01/18