Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Typing...

Herpiko Dwi Aguno herpiko

:octocat:
Typing...
View GitHub Profile
@herpiko
herpiko / latest-firefox.sh
Created Jun 5, 2017 — forked from ruario/latest-firefox.sh
This script will find the latest Firefox binary package, download it and repackage it into Slackware format.
View latest-firefox.sh
#!/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
View irgsh-node-doc.md

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.

View gist:47be4e90f116689d865c326cf28f6b11
# 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:
View hosts.txt
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 Jul 19, 2017
PKITB Integration tests
View tests.md
  • 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
View aes256.cpp
// 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 Jul 27, 2017
AES-CBC Base64 Encryption
View aes.cpp
#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 Aug 2, 2017
Orcinus dashboard complete deployment
View doc.md

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 Aug 4, 2017
Orcinus deploy script
View deploydong.sh
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 Aug 23, 2017
PKITB Stream test
View index.js
/*
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');