Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Typing...

Herpiko Dwi Aguno herpiko

:octocat:
Typing...
View GitHub Profile
View gist:377257aa4a14efba95e0296ee7566334
c:\Users\herpiko\src\erpiko\build>cmake -G "Visual Studio 14 2015 Win64" ..
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
@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:
@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 / 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 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 / index.js
Last active Sep 8, 2017
HTTPS Express
View index.js
var fs = require('fs');
var http = require('http');
var https = require('https');
var privateKey = fs.readFileSync('/tmp/key.pem', 'utf8');
var certificate = fs.readFileSync('/tmp/cert.pem', 'utf8');
var credentials = {key: privateKey, cert: certificate, passphrase : '123456'};
var express = require('express');
var app = express();
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";