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 / deploydong.sh
Created August 4, 2017 16:47
Orcinus deploy script
IP=$1
docker service rm $(docker service ls -q)
docker rm $(docker ps -aq)
yes | docker network prune
docker swarm leave --force
orcinus cluster init $IP
docker network create --driver overlay orcinus
cd orcinus/deploy/dashboard
@herpiko
herpiko / index.js
Created August 23, 2017 15:10
PKITB Stream test
/*
You need to install some modules first :
npm install --save string-to-stream stream-chunker ws
*/
var WebSocket = require('ws');
var str2Stream = require('string-to-stream');
var chunker = require('stream-chunker');
From: "User Name" <username@gmail.com>
To: "John Smith" <john@example.com>
Subject: This is a test
Hi John,
I’m sending this mail with curl thru my gmail account.
Bye!
herpiko@zulfiqar:Contents $ cat Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>15G31</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
@herpiko
herpiko / yo.sh
Last active September 15, 2017 18:22
Non-CUDA / OpenCL Tensorflow build
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.2 //tensorflow/tools/pip_package:build_pip_package
@herpiko
herpiko / kodeetik.txt
Last active September 18, 2017 15:04
Event ini kami didedikasikan untuk memberikan pengalaman berbagi yang
bebas dari tindakan 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), atau pilihan teknologi.
Kami tidak mentolerir pelecehan terhadap individu dalam bentuk apapun, bahasa
seksual maupun gambar yang tidak sesuai untuk tempat penyelenggaraan manapun termasuk
ceramah, workshop, pesta, publikasi Twitter dan media online lainnya. Individu
yang melanggar peraturan ini dapat dikenai sanksi atau diusir dari event tanpa
pengembalian dana (jika ada) atas kebijaksanaan penyelenggara event.
@herpiko
herpiko / README.md
Created September 26, 2017 15:50
Xephyr nested xserver

Required packages :

  • openssh-server
  • xserver-xephyr

Fire the new Xserver window

Xephyr -ac -screen 800x600 -br -reset -terminate 2> /dev/null :1
@herpiko
herpiko / dell.sh
Created October 9, 2017 17:10
Force full resolution on DELL P2212HB
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode DP1 1920x1080_60.00
@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 / vpn.bat
Created October 11, 2017 05:30
OpenVPN in Windows
"C:\Program Files\OpenVPN\bin\openvpn.exe" --config C:\Users\herpiko\vpn\piko.ovpn --pkcs12 C:\Users\herpiko\vpn\piko.p12 --tls-auth C:\Users\herpiko\vpn\piko-tls.key