Skip to content

Instantly share code, notes, and snippets.

View reterVision's full-sized avatar
🍙

Chao Gao reterVision

🍙
View GitHub Profile
@reterVision
reterVision / udp_client.go
Created July 12, 2014 07:50
A dummy UDP hole punching sample in Go
package main
import (
"encoding/json"
"fmt"
"log"
"net"
"os"
"time"
)
@reterVision
reterVision / client.go
Last active February 26, 2018 06:58
Passing file with gob.
package main
import (
"bufio"
"encoding/gob"
"log"
"net"
"os"
)
@reterVision
reterVision / notes.md
Last active March 30, 2023 11:51
Linux Performance Tuning

1.1 Linux process management

  • process scheduling
  • interrupt handling
  • signaling
  • process prioritization
  • process switching
  • process state
  • process memory
@reterVision
reterVision / AppDelegate.swift
Last active March 19, 2016 20:18
Facebook Login with SDK4.0 and Swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
@reterVision
reterVision / atomic_test.go
Created May 16, 2015 08:38
Benchmark Testing: RWMutex vs sync/atomic
package main
import (
"sync"
"sync/atomic"
"testing"
)
func Benchmark_Lock(b *testing.B) {
var lock sync.RWMutex
Verifying that "retervision.id" is my Blockstack ID. https://onename.com/retervision