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 / openssl.cnf
Last active May 8, 2020 12:34
Root CA configuration
# OpenSSL root CA configuration file.
# Copy to `/tmp/ca/openssl.cnf`.
[ ca ]
# `man ca`
default_ca = CA_default
[ CA_default ]
# Directory and file locations.
dir = /tmp/ca
@herpiko
herpiko / log.txt
Created May 5, 2020 08:02
nvidia 1660 ti cudnn cuda tensorflow
```
➜ imagerec git:(updated-deps) ✗ nvidia-smi
Tue May 5 15:00:40 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.33.01 Driver Version: 440.33.01 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce GTX 166... On | 00000000:01:00.0 On | N/A |
@herpiko
herpiko / convert.bash
Created April 27, 2020 21:33
converting pdf to png, works on multipage PDF
#!/bin/bash
for file in *; do
if [ ${file: -4} == ".pdf" ]
then
echo "Converting $file using ghost script..."
# Handle multi pages
gs -sstdout=%stderr -dPDFSTOPONERROR -dNOPAUSE -sDEVICE=pngalpha -o $file-%03d.png -r600 $file
if [ "$?" != "0" ]
then
@herpiko
herpiko / the_ninja_path.md
Last active February 28, 2020 06:21
The Ninja Path

The Ninja Path

Description

Given the specific parameters (size, wall, start and target), you should build a virtual block map. If the size is 10, then it will be a 10x10 blocks map. Each block is numbered sequentially from left to right, then top to bottom. The initial value for this sequence is 1.

If the size value is 6, then the map will be like this,

Screen Shot 2020-01-30 at 22 59 54

@herpiko
herpiko / klas-pki-playground.md
Last active January 2, 2020 16:18
💻 🔨 :neckbeard: PKI

Membuat sertifikat self-signed

openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem

Melihat isi sertifikat

openssl x509 -in cert.pem -text

PEM dan DER

@herpiko
herpiko / linux_x380.md
Created December 28, 2019 04:43 — forked from wassname/linux_x380.md
xubuntu on a Thinkpad Yoga x380

This are a collection of fixes and tweaks I used to get Xubuntu 18.04 LTS working on a lenovo thinkpad X380 yoga laptop.

@herpiko
herpiko / blengon-rapat-tatap-001.md
Last active July 26, 2019 16:12
Blengon Rapat Tatap 001

Requirements

  • Docker
  • Redis
  • gpg pbuilder debootstrap devscripts python-apt reprepro

Install

curl -o- https://raw.githubusercontent.com/BlankOn/irgsh-go/master/utils/scripts/install.sh | bash -s v0.0.21-alpha

Gitlab CI Example

  1. Runner machine: Install docker and docker-compose
  2. Runner machine: Registering the runner as shell
  3. Runner machine: Run the runner
  4. Runner machine: Allow gitlab-runner to access docker service
  5. Gitlab: Disable shared runner on CI settings
  6. Gitlab: Generate access token with api and registry access enabled
  7. Docker: Log into registry.gitlab.com using access token
  8. Runner machine: Generate SSH key, put itself into authorized_keys
@herpiko
herpiko / rewriting-the-irgsh.md
Last active April 6, 2019 10:47
Rewriting The IRGSH

The reasons behind my decision to rewrite IRGSH are ranged from personal motivation to BlankOn project direction.

After Uluwatu released, a hard disk died in one of BlankOn development server. Unfortunately, the machine is the important one. The hard disk contains IRGSH, the backbone of BlankOn Linux development. The fortunate side is this happened after Uluwatu released. A year before this incident, Estu and I have tried to put IRGSH into production from scratch and it is really hard to do so. IRGSH was written in Python 2.6.x and it depends on some old and deprecated libraries. Even one of them (in a specific version, respectively) is no longer exist on the internet. A real dependency hell. It's hard to deploy IRGSH in a modern operating system and it keeps alynne.blankonlinux.or.id from a system upgrade. The IRGSH was also very modular but combining them into a working distributed cluster takes time and quite steep learning curve. We still need to prepare a lot of things before doing that. Pbuilder need