Skip to content

Instantly share code, notes, and snippets.

View xianlubird's full-sized avatar

Xianlu Bird xianlubird

View GitHub Profile
@xianlubird
xianlubird / main.go
Created October 11, 2018 07:40 — forked from nak3/main.go
test of viper and glog combination
package main
import (
"flag"
"fmt"
"github.com/golang/glog"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"github.com/spf13/viper"

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@xianlubird
xianlubird / validate_uuid4.py
Created February 21, 2016 15:12 — forked from ShawnMilo/validate_uuid4.py
Validating a uuid4 with Python.
from uuid import UUID
def validate_uuid4(uuid_string):
"""
Validate that a UUID string is in
fact a valid uuid4.
Happily, the uuid module does the actual
checking for us.
@xianlubird
xianlubird / 0_reuse_code.js
Created October 28, 2015 07:48
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console