Skip to content

Instantly share code, notes, and snippets.

Working from home

Hasan Basri hasanbasri1993

Working from home
View GitHub Profile
hasanbasri1993 / tally_light.ino
Created Dec 6, 2021
tally light for atem switcher using esp8266
View tally_light.ino
Tally light ESP8266 for Blackmagic ATEM switcher
Version 1.5
A wireless (WiFi) tally light for Blackmagic Design
ATEM video switchers, based on the Wemos D1 Mini ESP8266 development
board with WS2812B RGB Shield and the Arduino IDE.
View openvpn.conf
ca /home/pi/openvpn/ca.cert
cert /home/pi/openvpn/client.cert
key /home/pi/openvpn/client.key
cipher BF-CBC
dev tun
proto tcp
View gist:565c698c665aa63ec310dffcaa4c48dc
docker network create influxdb
docker run --rm telegraf telegraf config > telegraf.conf
docker run -d --restart always --name influxdb --net=influxdb -p 8086:8086 influxdb
docker run -d --restart always --name=telegraf --net=influxdb -v /Users/hasanbasri1/telegraf.conf:/etc/telegraf/telegraf.conf:ro telegraf
View gist:bb5785ca0e3cab73ddf5f2e8d161f45b
# Configuration for telegraf agent
## Default data collection interval for all inputs
interval = "1s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
## Telegraf will send metrics to outputs in batches of at most
## metric_batch_size metrics.
View tripay_create
function tripay_create($postData = false)
$order_items = [];
$post = $postData ? $postData : $this->request->getPost();
$apiKey = $this->apiKey;
$privateKey = $this->privateKey;
$merchantRef = $post['id_order'];
$amount = $post['biaya'] + 5000;
$method = $post['metode_bayar'];
if (isset($post['data']) and !isset($post['id_takhosus'])) {
hasanbasri1993 /
Last active Nov 30, 2020 — forked from corny/
Improved backup script for Ubiquiti UniFi controller
#!/bin/bash -e
# Improved backup script for Ubiquiti UniFi controller
# original source:
# must contain:
hasanbasri1993 / read_float.js
Last active Nov 14, 2020
Membaca 32 bit Float Dari MODBUS Menggunakan NodeRed
View read_float.js
msg.payload = [0, 16833]; // hapus ini untuk melihat menkorvensi dari modbus
let pay = msg.payload; // mengambil data dari modbus
const buf = Buffer.allocUnsafe(4);
msg.payload = buf.readFloatBE(0);
return msg;
View blynk-macOs-media-control.js
#!/usr/bin/env node
const Blynk = require('blynk-library');
const applescript = require('applescript');
const AUTH = '';
const blynk = new Blynk.Blynk(AUTH);
const volume = new blynk.VirtualPin(0)
const play = new blynk.VirtualPin(1)
const next = new blynk.VirtualPin(2)
View ulang dan selesai
function selesaikan_ujian(id) {
title: 'Apa anda yakin?',
text: "aksi ini akan menyelesaikan secara paksa ujian yang sedang berlangsung!",
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Yes!'
}).then((result) => {
if (result.value) {
View selesai.php
$idm = $_POST['id_mapel'];
$ids = $_POST['id_siswa'];
$idu = $_POST['id_ujian'];
$where = array(
'id_mapel' => $idm,