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
FROM tatsushid/tinycore-node
# set environment
ENV APP=/opt/maoo
# Create app directory
RUN mkdir -p $APP
WORKDIR $APP
# Install app dependencies
COPY package.json $APP
FROM anak10thn/tinycore-nodejs
# set environment
ENV APP=/opt/maoo
# Create app directory
RUN mkdir -p $APP
WORKDIR $APP
# Install app dependencies
COPY package.json $APP
@herpiko
herpiko / DELETE.md
Created December 18, 2018 01:41
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 http://127.0.0.1:5000/v2/cdl/oa/oa-frontend-pkblu-v1/manifests/sha256:ae7a8a9605becc07c244e476c5430f800adc8f0e7b669fd596975a70bd102e1b
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;
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 9901
static_resources:
listeners:
- name: listener_0
@johnrees
johnrees / gist:b116e426bc73040876c0
Created February 6, 2016 13:38
streaming desktop to rtmp using ffmpeg
$ git clone https://github.com/iizukanao/node-rtsp-rtmp-server
$ 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://0.0.0.0/live/desktop
# stream on ios device
$ git clone https://github.com/iMoreApps/ffmpeg-avplayer-for-ios-tvos
$ open AVPlayerDemo.xcodeproj (change rtmp stream to rtmp://<LOCAL_IP>/live/desktop, build and run)
@dmitshur
dmitshur / gist:6927554
Last active September 17, 2023 07:35
[Legacy GOPATH mode] How to `go get` private repos using SSH key auth instead of password auth.

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 https://tip.golang.org/cmd/go/#hdr-Configuration_for_downloading_non_public_code and https://golang.org/ref/mod#private-modules.

$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
$ cat ~/.gitconfig
[url "git@github.com:"]
	insteadOf = https://github.com/
$ go get github.com/private/repo && echo Success!
Success!
@wassname
wassname / linux_x380.md
Last active February 5, 2024 17:43
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.

@SzymonPobiega
SzymonPobiega / gist:5220595
Last active February 28, 2024 03:35
DDD/CQRS/ES/Architecture videos

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]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):

  1. Eric Evans' [What I've learned about DDD since the book]{http://www.infoq.com/presentations/ddd-eric-evans}
  2. Eric Evans' [Strategic Design - Responsibility Traps]{http://www.infoq.com/presentations/design-strategic-eric-evans}
  3. Udi Dahan's [Avoid a Failed SOA: Business & Autonomous Components to the Rescue]{http://www.infoq.com/presentations/SOA-Business-Autonomous-Components}
  4. Udi Dahan's [Command-Query Responsibility Segregation]{http://www.infoq.com/presentations/Command-Query-Responsibility-Segregation}
  5. Greg Young's [Unshackle Your Domain]{http://www.infoq.com/presentations/greg-young-unshackle-qcon08}
  6. Eric Evans' [Acknowledging CAP at the Root -- in the Domain Model]{ht
# 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