Skip to content

Instantly share code, notes, and snippets.

View herpiko's full-sized avatar
:octocat:
Typing...

Herpiko Dwi Aguno herpiko

:octocat:
Typing...
View GitHub Profile
@herpiko
herpiko / README.md
Last active November 24, 2017 21:54
Slackware Post Install

My Slackware Post Install Guide for Thinkpad X200/X220 Laptop

There are times where I flushed the Slackware partition for another purpose. Especially when I have to hack on BlankOn project. I always want to reinstall Slackware, and reinstall and reinstall again. It's tiring. So, this is my fast post install guide for my Slackware setup to get the machine work-ready. This applied for Slackware 14.2.

Pre-installation

dd if=slackware-14.2-install-dvd.iso of=/dev/sdX

@herpiko
herpiko / createobject.cpp
Last active November 30, 2017 18:37
RV value check
if (rv == CKR_ARGUMENTS_BAD) {
std::cout << "err 1\n";
} else if (rv == CKR_ATTRIBUTE_READ_ONLY) {
std::cout << "err 2\n";
} else if (rv == CKR_ATTRIBUTE_TYPE_INVALID) {
std::cout << "err 3\n";
} else if (rv == CKR_ATTRIBUTE_VALUE_INVALID) {
std::cout << "err 4\n";
} else if (rv == CKR_CRYPTOKI_NOT_INITIALIZED) {
std::cout << "err 5\n";
@herpiko
herpiko / index.js
Created December 4, 2017 22:55
cingicanga-npwp-match
// Usage : use Node 8.x, pipe the output to empty csv file.
var fs = require('fs');
var async = require('async');
var byline = require('byline');
var stringSimilarity = require('string-similarity');
var sqlite3 = require('sqlite3').verbose();
var db = new sqlite3.Database('data.db');
var stream = fs.createReadStream('A2914.csv');
db.serialize(function() {
@herpiko
herpiko / maran.zsh-theme
Created January 6, 2018 20:06
Simplified Maran
# Theme with full path names and hostname
# Handy if you work on different servers all the time;
#PROMPT='%{$fg[cyan]%}%n%{$reset_color%}@%{$fg[yellow]%}%M:%{$fg[green]%}%/%{$reset_color%} $(git_prompt_info) %(!.#.$) '
PROMPT='%{$fg[green]%}%n%{$reset_color%}@%{$fg[green]%}%M:%{$fg[green]%}%c%{$reset_color%}$(git_prompt_info) %(!.#.$) '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[cyan]%}git:("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
@herpiko
herpiko / mutual.cpp
Created January 11, 2018 07:43
Mutual auth with libcurl
const char *certFile = "C:/mutual/cert.pem";
const char *keyFile = "C:/mutual/key.pem";
const char *cacertsFile = "C:/mutual/ca.pem";
CURL *curl;
CURLcode res;
curl_global_init(CURL_GLOBAL_DEFAULT);
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_VERBOSE, 2L);
@herpiko
herpiko / yo.sh
Last active February 2, 2018 00:31
Fetch artifacts' URL from Appveyor
LATEST=$(git ls-remote https://gitlab.com/KodeKreatif/erpiko.git | grep master)
if [ -z "$LATEST" ]; then
exit 1
fi
LATEST=$(echo $LATEST | cut -d' ' -f1)
URL="https://gitlab.com/KodeKreatif/erpiko/commit/$LATEST/pipelines"
PIPELINE_ID=$(curl $URL | grep passed | grep external | cut -d/ -f5)
if [ -z "$PIPELINE_ID" ]; then
exit 1
fi
@herpiko
herpiko / langka.md
Last active March 7, 2018 07:09
langka
  • Title : Langka
  • Author : Damar Gumilang

“Tumben?”

Tidak kujawab. Kulepas tas selempang dan mengeluarkan buku-buku yang akan dikembalikan.

“Kenapa lesu begitu?”

Aku menahan diri untuk tidak berkata-kata yang tidak perlu dan berbisik, “Dendanya jadi berapa?”

go build &amp;&amp; ./go-wrk -c 1 -n 1 -cert license/liccert.pem -key license/lickey.pem -CA license/TNISiberLabRootCA-chain.pem -m POST -b machineId=x https://x

@herpiko
herpiko / A Short History of Tractors in Ukrainian.md
Last active April 4, 2018 11:07
A Short History of Tractors in Ukrainian

A Short History of Tractors in Ukrainian

Buku ini adalah sebuah novel debut fiksi yang menyabet nominasi Orange Prize, dikarang oleh penulis imigran Ukrania yang besar di Britania. Meskipun dari sampulnya sepintas terlihat ramah dan datar, ini bukanlah buku yang cocok dibaca oleh remaja maupun anak-anak. Saya menyarankan batas umur 18 tahun ke atas. Tentu saja ini bukan buku porno atau sepenuhnya vulgar. Hanya sebagian kecil dari buku ini yang menyinggung hal vulgar, meskipun demikian bagian kecil tersebut berperan erat dalam melekatkan rangkaian cerita di buku ini. Buku ini ditulis dalam sudut pandang pertama, dari seorang tokoh yang bernama Nadezhda.

Sinopsis

Kisah yang gambarkan di buku ini adalah tentang sebuah keluarga imigran kecil dari Ukraina yang tinggal di Inggris namun sudah terpencar-pencar dan tinggal terpisah; Nikolai (sang Ayah, berusia 74 tahun, seorang mekanik mesin, penulis dan penyair), Vera (putri pertama), dan Nadezhda (putri kedua). Nikolai telah ditinggal mati oleh istrinya, sedangka

@herpiko
herpiko / sawtooth.md
Last active April 23, 2018 18:54
Hyperledger Sawtooth

Genesis

$ sawtooth keygen
$ sawset genesis
$ sudo -u sawtooth sawadm genesis config-genesis.batch

Things that need to be run beside the validator