Skip to content

Instantly share code, notes, and snippets.

Yinghai Zhao hisea

Block or report user

Report or block hisea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hisea
hisea / cloud.yml
Created Apr 3, 2019
rancher cloud config
View cloud.yml
ssh_authorized_keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDW8gOCw2WSGDLEEN6Knytz9lKwiy48SBKFSiORSiNGBh3H996T+XUe7E9ytgtT587IItGkYpfnmpqa4EkVYPEL5JdOHrd9aDtUnKm5Jmb1Z18ffl2a/yzVFoiGT1vO96kFjg5UCdxlOa4I7rlEPgo7xmrDRO7fVyALQJmc8VIFFEyX4pOFC/r++42n9tZMHX+F4hX0BvUVOzkKLzgU20iVMfLCtmJ359WAyLze3al5+Vxb/1s93J3+6+LJMMUFO6ecHTCt/MrQzSdw4e6fupcRafHbHUXuuN3ynhBysJbMUqFvC2sEi64w83H2BFqZ5hdBfwz5hALxNZw0XWRzEQgV zyinghai@gmail.com
@hisea
hisea / asymmetric.go
Created Sep 24, 2018 — forked from cryptix/asymmetric.go
example of using JWT for http authentication in go
View asymmetric.go
package main
// using asymmetric crypto/RSA keys
import (
"crypto/rsa"
"fmt"
"io/ioutil"
"log"
"net/http"
View gist:0aef5b74c78bc0420602423d607badc7
include .env
PROJECTNAME=$(shell basename "$(PWD)")
# Go related variables.
GOBASE=$(shell pwd)
GOPATH=$(GOBASE)/vendor:$(GOBASE)
GOBIN=$(GOBASE)/bin
GOFILES=$(wildcard *.go)
View genesis_public_key
0426efaf9b2b37b56e22d529d9c2b897ff8450f2aa36f808c2f378d2252c5af9fabfc935713c624820e50a6f6fefa5b730f5dddde61c27b78d51182b9cb66b1194;yumao5
@hisea
hisea / ethminer_ubuntu_nvidia.md
Created Dec 25, 2017 — forked from johnstcn/ethminer_ubuntu_nvidia.md
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04
View ethminer_ubuntu_nvidia.md

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

Hardware

@hisea
hisea / ethminer_ubuntu_nvidia.md
Created Dec 25, 2017 — forked from johnstcn/ethminer_ubuntu_nvidia.md
NVIDIA/CUDA ethminer setup under Ubuntu Server 16.04
View ethminer_ubuntu_nvidia.md

Headless Ethminer (nVidia) Setup Guide

Cian Johnston, July 2017

A couple of weeks ago, I decided I should put my gaming rig to work crypto mining. I did not expect to make any significant profit on this, it was more of a fun project to set up. However, there were a large number of tutorials and guides already out there, and many were more than a year out of date.

This guide assumes the reader already has a crypto wallet set up, is comfortable with Linux and the command line, and knows how to use Google if they run into problems.

The end result is an Ubuntu 16.04 LTS headless server running CUDA ethminer via systemd.

Hardware

@hisea
hisea / install_connector.sh
Last active Dec 14, 2016 — forked from hkhamm/install_connector.sh
Install the Spark Cassandra Connector
View install_connector.sh
#!/bin/bash
# Installs the spark-cassandra-connector and support libs
mkdir /usr/local/opt/connector
cd /usr/local/opt/connector
rm *.jar
curl -o ivy-2.4.0.jar \
'https://repo1.maven.org/maven2/org/apache/ivy/ivy/2.4.0/ivy-2.4.0.jar'
@hisea
hisea / create-multi-host-swarm-digitalocean.sh
Last active Aug 2, 2016 — forked from jmshal/create-multi-host-swarm-digitalocean.sh
Setup a Docker Swarm multi-host cluster on DigitalOcean
View create-multi-host-swarm-digitalocean.sh
docker-machine create \
--driver=digitalocean \
--digitalocean-access-token=$DO_TOKEN \
--digitalocean-size=512mb \
--digitalocean-region=tor1 \
--digitalocean-private-networking=true \
--digitalocean-image=ubuntu-16-04-x64 \
docker-swarm-kv-store
docker $(docker-machine config docker-swarm-kv-store) run -d \
@hisea
hisea / VPN.md
Last active Dec 19, 2015
Ubuntu OpenVPN Setup
View VPN.md

Ubuntu Official guide

Link

Ubuntu Server 14.04.1 How To setup OpenVPN server on a seperate machine than the LAN gateway (with access to other machines on server LAN)

Make sure your openvpn LAN is not the usual 192.168.1.1 or 10.0.0.1. If it is, log in to your router and change the third number ie. 192.168.(this number).1

Make sure to forward port 1194 on your router to the OpenVPN server IP

Example Network:

View gist:ba016082856e8af44010
var page = require('webpage').create(),
system = require('system'),
t, address;
if (system.args.length === 1) {
console.log('Usage: loadspeed.js <some URL>');
phantom.exit();
}
You can’t perform that action at this time.