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 / 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?”

@herpiko
herpiko / kubedingdong.md
Last active March 7, 2023 19:10
Kubernetes notes for CKA exam preparation 💪

This notes applied to Kubernetes version 1.9.1-00 on Ubuntu Xenial.

Basic concept

TO BE WRITTEN

Installation and starting up 🏁

Installation

  • Swap should be disabled (see /etc/fstab)
@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 / 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 / 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 / meh.md
Last active October 31, 2018 14:02
libtoolize: AC_CONFIG_MACRO_DIR([m4]) conflicts with ACLOCAL_AMFLAGS=-I m4

You may found this link on the top result of Google search, http://pete.akeo.ie/2010/12/that-darn-libtoolize-acconfigmacrodirm4.html. It still confusing, adding .gitattributes doesnt seem fix it, but it does if we do in this sequences :

  • Create a dir and enter it
  • git init
  • Create the .gitattributes file as told above
  • git remote add origin repoaddress
  • git fetch origin
  • git checkout origin/master
  • autoreconf -fi
  • Done!
@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 / 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 / trustmeplease.md
Last active April 28, 2018 03:07
PKI Trust relations

Trust

Derived Still valid Result: is verified?
Yes Yes Verified
Yes No Not verified
No Yes Not verified
No No Not verified
@herpiko
herpiko / coc.md
Last active October 20, 2017 14:26
CoC example

Grup obrol kami didedikasikan untuk memberikan pengalaman berbagi antar anggota komunitas yang bebas pelecehan untuk semua orang, terlepas dari jenis kelamin, identitas dan ekspresi gender, usia, orientasi seksual, kecacatan, penampilan fisik, ukuran tubuh, ras, etnisitas, agama (atau kekurangannya), pandangan politik atau pilihan teknologi. Kami tidak mentolerir pelecehan terhadap anggota lain di dalam komunitas dalam bentuk apapun. Anggota yang melanggar kode etik ini dapat dikenai sanksi atau diusir dari komunitas atas kebijakan/kesepakatan bersama.