Skip to content

Instantly share code, notes, and snippets.

View mingderwang's full-sized avatar
:bowtie:
On chain, building AA wallet

Ming-der Wang mingderwang

:bowtie:
On chain, building AA wallet
View GitHub Profile
@leonklingele
leonklingele / openssl.cnf
Last active February 9, 2018 22:22
Useful openssl commands
[ req ]
default_bits = 4096
default_md = sha256
default_keyfile = private.key
distinguished_name = req_distinguished_name
attributes = req_attributes
x509_extensions = v3_user_req
req_extensions = v3_user_req
[ req_distinguished_name ]
@prehensile
prehensile / kube-resources.py
Last active October 8, 2015 04:48
Various Kubernetes / Google Container Engine tools
#!/usr/bin/env python
##
# kube-resources.py
# Collate and report Kubernetes pod usages vs. node limits.
#
# Assumes `kubectl` is installed and available.
#
# Author: Henry Cooke, [email protected]
# Version: 20150816
@gbranchaudrubenovitch
gbranchaudrubenovitch / ansible-hash-objects-sample
Last active December 22, 2016 09:35
Some ansible hash-objects samples...
# in your group vars
HOST_SUFFIX: "dev.apps"
SERVICE_LIST:
- {serviceName: "my_service1", destinationUrl: "http://some-random-dev-machine:5555/"}
- {serviceName: "admin.my_service1", destinationUrl: "http://some-random-dev-machine:5556/"}
- {serviceName: "other-service2", destinationUrl: "http://another-machine-another-port:4279/"}
# in your playbook's yaml
...
roles:
@vasanthk
vasanthk / System Design.md
Last active July 18, 2025 05:13
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@mingderwang
mingderwang / index.html
Last active June 12, 2016 14:43
Untitled benchmark #jsbench #jsperf (http://jsbench.github.io/#f7e90da0eec030236ddc78b7a6656568) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@justincjahn
justincjahn / 10-cisco-elasticsearch.conf
Last active August 9, 2024 22:37
Logstash: Processing Cisco Logs
#
# INPUT - Logstash listens on port 8514 for these logs.
#
input {
udp {
port => "8514"
type => "syslog-cisco"
}
@mose
mose / k8sandbox-remote.md
Last active January 19, 2018 14:37
kubesandbox remote access

As I was testing around with https://bitnami.com/stack/kubernetes-sandbox I wanted to remotely access it

First find the token, by getting on the server, which is configured to trust any local user to be cluster admin with kubectl

TOKEN=$(kubectl get secrets -n kube-system | grep default-token | awk '{print $2}')
kubectl describe secret $TOKEN -n kube-system | grep token:

Now give that default user the cluster admin role

kubectl create clusterrolebinding admin-role --clusterrole=cluster-admin --serviceaccount=kube-system:default
@markblundeberg
markblundeberg / atomic-size-attack.md
Created February 16, 2018 05:14
Advisory: secret size attack on cross-chain hash lock smart contracts

Advisory: secret size attack on cross-chain hash lock smart contracts

Dr. Mark B Lundeberg, 2018 Feb 15 bitcoincash:qqy9myvyt7qffgye5a2mn2vn8ry95qm6asy40ptgx2

This security advisory notes a vulnerability in the common construction of cross-chain smart contracts (contracts between distinct cryptocurrencies) through hash locking. I focus on the primary use case in [atomic

@Bradleykingz
Bradleykingz / animals.txt
Last active September 9, 2023 18:41 — forked from atduskgreg/animals.txt
Alphabetized, removed all occurrences of 'list'
Aardvark
Aardwolf
African Buffalo
African Elephant
African Leopard
Albatross
Alligator
Alpaca
Alpaca
American Buffalo (bison)
@mingderwang
mingderwang / ansible_playbook.yml
Created November 8, 2019 08:27 — forked from nikhiljha/ansible_playbook.yml
GlusterFS Ansible Setup
---
- hosts: gluster
become: true
vars:
gluster_mount_dir: /mnt/g1
gluster_brick_dir: /bricks/brick1
gluster_brick_name: g1
tasks:
- name: Install parted