Skip to content

Instantly share code, notes, and snippets.

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

Ming-der Wang mingderwang

:bowtie:
On chain, building L2
View GitHub Profile
@mingderwang
mingderwang / dhcpd.conf
Last active November 22, 2019 07:38 — forked from muka/dhcpd.conf
Setup a dhcpd server using docker
ddns-update-style none;
option domain-name "bimap.co";
option domain-name-servers 208.67.222.222, 208.67.220.220;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
@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
@mingderwang
mingderwang / Build-LXC-and-erlang-on-Ubuntu
Created June 28, 2018 08:06 — forked from sayotte/Build-LXC-and-erlang-on-Ubuntu
Build LXC, then use it to create a container, and use that container to build Erlang. All starting from a clean Ubuntu-12.04.3 server install.
### Prepare the host system
sudo sh -c "cat - >> /etc/apt/sources.list.d/ddebs.list" << EOF
deb http://ddebs.ubuntu.com precise main restricted universe multiverse
deb http://ddebs.ubuntu.com precise-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com precise-security main restricted universe multiverse
EOF
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y linux-image-3.8.0-34-generic
@mingderwang
mingderwang / guardian_gaza.ipynb
Created December 12, 2017 05:38 — forked from darribas/guardian_gaza.ipynb
A IPython Notebook to analyze the Gaza-Israel 2012 crisis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Homebrew Permissions Denied Issues Solution

Installing and fixing node.JS


brew install node

@mingderwang
mingderwang / nginx-mysql.json
Created September 17, 2017 08:05 — forked from anonymous/nginx-mysql.json
nginx-mysql.json for labs.play-with-k8s.com playground (refer to https://medium.com/kubernetes-playground)
{
"id":"nginx-mysql",
"kind": "Pod",
"apiVersion": "v2",
"metadata": {
"name": "nginx-mysql",
"labels": {
"name": "nginx-mysql"
}
},
apiVersion: v1
kind: ReplicationController
metadata:
name: elk-rc
labels:
k8s-app: elk
spec:
selector:
k8s-app: elk
template:
@mingderwang
mingderwang / ballot.sol
Created August 15, 2017 07:32 — forked from anonymous/Untitled
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://chriseth.github.io/browser-solidity/#version=soljson-latest.js&optimize=undefined&gist=
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
uint voteCount;
@mingderwang
mingderwang / elk.sh
Last active April 14, 2021 07:26 — forked from abhishektomar/elk.sh
Bash Script to Install Elastic Search, Logstash and Kibana
#!/bin/bash
# your have to add hostname after script command, ether "elk1", "elk2", or "elk3"
if [ $# -eq 1 ]
then
echo "my hostname: $1"
MY_HOSTNAME=$1
else
echo "Usage: ./elk.sh HOSTNAME, where HOSTNAME is an argument as a unique hostname for the elasticsearch cluaster, ether "elk1", "elk2", or "elk3" "
exit
fi