Skip to content

Instantly share code, notes, and snippets.

View piaoger's full-sized avatar

Piaoger piaoger

View GitHub Profile
@piaoger
piaoger / json_toml_marshal_unmarshal.go
Last active April 17, 2017 08:07
marshal and unmarshal of json/toml
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"github.com/BurntSushi/toml"
"errors"
)
// borrowed from golang playgroud:
@piaoger
piaoger / filetime.go
Last active May 11, 2017 03:41
get/set filetime in golang
import (
"os"
"syscall"
"time"
)
func statTimes(name string) (atime, mtime, ctime time.Time, err error) {
fi, err := os.Stat(name)
if err != nil {
@piaoger
piaoger / install-valkan-library.sh
Created March 8, 2019 09:29
install libvulkan in Ubuntu
##https://vulkan.lunarg.com/
## https://vulkan.lunarg.com/sdk/home
# 18.04
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.1.101-bionic.list http://packages.lunarg.com/vulkan/1.1.101/lunarg-vulkan-1.1.101-bionic.list
sudo apt update
sudo apt install lunarg-vulkan-sdk