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

Persiapan kunci penanda tangan paket

Keaslian paket di lumbung turunan Debian dibantu oleh verifikasi tanda tangan digital dengan kunci GPG (itu sebabnya alamat lumbung tersebut tidak perlu lagi dilindungi oleh HTTPS/TLS, lihat https://whydoesaptnotusehttps.com/). Kita memerlukan kunci GPG untuk menandatangani paket-paket nantinya. Setelah dibuat sesuai panduan di bawah ini, kunci-kunci ini akan tersimpan di /.gnugpg.

Mempersiapkan rng untuk mempercepat generate entropy

$ sudo apt-get install rng-tools
$ sudo rngd -r /dev/urandom
#!/bin/bsh
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
apt-key fingerprint 0EBFCD88
@herpiko
herpiko / ffmpeg-hack.md
Last active March 17, 2019 13:24
Scene detection
sudo apt-get install libavfilter-dev libavfilter-extra libavfilter-extra6

Cut

ffmpeg -i 2019-03-06_0700.avi -ss 00:04:20 -t 00:04:40 -async 1 2019-03-06_0700-cut.avi
- header:
key: "Strict-Transport-Security"
value: "max-age=63072000; includeSubdomains"
- header:
key: "Content-Security-Policy"
value: "default-src 'self'"
- header:
key: "X-Permitted-Cross-Domain-Policy"
value: "none"
- header:
@herpiko
herpiko / DELETE.md
Created December 18, 2018 01:41
Delete image from private registry

Get the identifier first,

curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET http://localhost:5000/v2/cdl/oa/oa-frontend-pkblu-v1/manifests/master 2>&1 | grep Docker-Content-Digest | awk '{print ($3)}'

Then delete it

curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X DELETE http://127.0.0.1:5000/v2/cdl/oa/oa-frontend-pkblu-v1/manifests/sha256:ae7a8a9605becc07c244e476c5430f800adc8f0e7b669fd596975a70bd102e1b