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 / latest-firefox.sh
Created June 5, 2017 15:02 — forked from ruario/latest-firefox.sh
This script will find the latest Firefox binary package, download it and repackage it into Slackware format.
#!/bin/bash
# latest-firefox Version 1.3.9
# This script will find the latest Firefox binary package, download it
# and repackage it into Slackware format.
# I don't use Firefox for regular browsing but it is handy for
# comparative tests against Vivaldi. :P
# Copyright 2016 Ruari Oedegaard, Oslo, Norway

Membangun irgsh-node (Builder)

Mempersiapkan sertifikat

Sertifikat-sertifikat ini nantinya akan digunakan sebagai otentikasi antara taskinit dan pekerjanya.

Inisialisasi CA

Jika sudah ada CA (Certificate Authority), buat sertifikat baru untuk komponen irgsh-web. Jika belum ada, berikut cara menginisalisasi CA baru dan membuat sertifikat turunan.

@herpiko
herpiko / gist:47be4e90f116689d865c326cf28f6b11
Created June 20, 2017 18:55
Orcinus' repository deployment
# testing :
#
# curl -H Host:omura.orcinus.id http://127.0.0.1
stack: "orcinus-dashboard"
services:
orcinus-repository:
image: "orcinus/omura"
constraint: "node.role==manager"
ports:
@herpiko
herpiko / hosts.txt
Created July 15, 2017 13:59
Hi Kominfo
149.154.167.99 telegram.org
149.154.167.120 web.telegram.org
149.154.171.22 flora.web.telegram.org
149.154.171.22 flora-1.web.telegram.org
149.154.167.118 web.telegram.me
149.154.167.118 telegram.me
@herpiko
herpiko / tests.md
Last active July 19, 2017 04:02
PKITB Integration tests
  • Sending from Surelia
    • To yourself, regular message
    • To one recip, regular message
    • To multiple recipients, regular message
    • To one recip, regular message
    • To one recip, regular message with attachments
    • To one recip, encrypted
    • To one recip, encrypted with attachment
    • To one recip, signed
  • To one recip, signed with attachment
@herpiko
herpiko / aes256.cpp
Last active July 25, 2017 08:56
AES256
// From https://stackoverflow.com/questions/9889492/how-to-do-encryption-using-aes-in-openssl
#include <openssl/evp.h>
#include <openssl/aes.h>
#include <openssl/err.h>
#include <string.h>
int main(int arc, char *argv[])
{
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
@herpiko
herpiko / aes.cpp
Created July 27, 2017 11:49
AES-CBC Base64 Encryption
#include <iostream>
#include "crypto.h"
using namespace std;
int main() {
std::cout << "yo\n";
// preparation
std::string keystr = "hiduplah indonesia raya";
@herpiko
herpiko / doc.md
Last active August 2, 2017 12:55
Orcinus dashboard complete deployment

Preparation

  • Make sure the mongod is running
  • Use NodeJS v7
  • Open port : 4000, 5009

Create orcinus cluster and network

Prune all network,

@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');