Skip to content

Instantly share code, notes, and snippets.


Herpiko Dwi Aguno herpiko

View GitHub Profile
View Token.sol
pragma solidity ^0.8.2;
contract Token {
mapping(address => uint) public balances;
mapping(address => mapping(address => uint)) public allowance;
uint public totalSupply = 1000000 * 10 ** 18;
string public name = "INDOG"; // name your token
string public symbol = "INDG"; // code your token
uint public decimals = 18;
# IDA (disassembler) and Hex-Rays (decompiler) plugin for Apple AMX
# WIP research. (This was edited to add more info after someone posted it to
# Hacker News. Click "Revisions" to see full changes.)
# Copyright (c) 2020 dougallj
# Based on Python port of VMX intrinsics plugin:
# Copyright (c) 2019 w4kfu - Synacktiv
View basic_auth.yaml
access_log_path: /tmp/admin_access.log
protocol: TCP
port_value: 9901
- name: listener_0
wassname /
Last active Dec 16, 2021
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 /
Created Dec 18, 2018
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
View Dockerfile.nodejs
FROM tatsushid/tinycore-node
# set environment
ENV APP=/opt/maoo
# Create app directory
RUN mkdir -p $APP
# Install app dependencies
COPY package.json $APP
View Dockerfile.nodejs
FROM anak10thn/tinycore-nodejs
# set environment
ENV APP=/opt/maoo
# Create app directory
RUN mkdir -p $APP
# Install app dependencies
COPY package.json $APP
johnrees / gist:b116e426bc73040876c0
Created Feb 6, 2016
streaming desktop to rtmp using ffmpeg
View gist:b116e426bc73040876c0
$ git clone
$ coffee -c .
$ node server.js
$ ffmpeg -f avfoundation -i "0" -vcodec libx264 -tune zerolatency -s 320x480 -vf crop=320:480:0:0 -f flv rtmp://
# stream on ios device
$ git clone
$ open AVPlayerDemo.xcodeproj (change rtmp stream to rtmp://<LOCAL_IP>/live/desktop, build and run)
dmitshur / gist:6927554
Last active Jul 13, 2022
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.
View gist:6927554

WARNING: This gist was created in 2013 and targets the legacy GOPATH mode. If you're reading this in 2021 or later, you're likely better served by reading and

$ ssh -A vm
$ git config --global url."".insteadOf ""
$ cat ~/.gitconfig
[url ""]
	insteadOf =
$ go get && echo Success!
SzymonPobiega / gist:5220595
Last active May 24, 2022
DDD/CQRS/ES/Architecture videos
View gist:5220595

If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:

In the evenings read the [Domain-Driven Design Quickly Minibook]{}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{}
  5. Greg Young's [Unshackle Your Domain]{}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht