Skip to content

Instantly share code, notes, and snippets.

View xiaokangwang's full-sized avatar

Xiaokang Wang (Shelikhoo) xiaokangwang

View GitHub Profile
@xiaokangwang
xiaokangwang / rawudp.go
Created May 23, 2018 12:30 — forked from chrisnc/rawudp.go
constructing ip/udp packets in go
package main
import (
"bufio"
"bytes"
"encoding/binary"
"flag"
"fmt"
"net"
"os"
@xiaokangwang
xiaokangwang / ubuntu-cli-install-android-sdk.sh
Last active September 13, 2023 19:16 — forked from zhy0/ubuntu-cli-install-android-sdk.sh
Install Android SDK on headless Ubuntu linux machine via command line, so that you can compile open source Android apps.
#!/bin/bash
# Thanks to https://gist.github.com/wenzhixin/43cf3ce909c24948c6e7
# Execute this script in your home directory. Lines 17 and 21 will prompt you for a y/n
# Install Oracle JDK 8
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install -y oracle-java8-installer
apt-get install -y unzip make expect # NDK stuff
@xiaokangwang
xiaokangwang / sortR.awk
Created September 21, 2017 13:16
Sort Cite with Year It was written
BEGIN{
Count=0
}
{
input[Count]=$0
Count++;
}
function SortByYear(i1, v1, i2, v2, l, r) {
Year1=match(v1, /20([0-9]){2}/, year)
v1=year[0]
<div id="paint">
<canvas id="myCanvas"></canvas>
</div>
<div class="floatbtn">
<a class="btn-floating btn-large waves-effect waves-light blue">
<i class="material-icons">home</i>
</a>
</div>
@xiaokangwang
xiaokangwang / caln.go
Created March 5, 2017 12:35
Convert Calander formart, from CUEB's version to a Google Calander importable formart
package main
import (
"encoding/csv"
"fmt"
"os"
"regexp"
"strconv"
"strings"
"time"
{
"log" : {
"access": "",
"error": "",
"loglevel": "info"
},
"inbound": {
"port": 10086,
"protocol": "vmess",
"settings": {
// ==UserScript==
// @name fuck http://imgclick.net
// @namespace https://kkdev.org
// @include http://imgclick.net/*
// @version 1
// @grant none
// ==/UserScript==
$(document).ready(function(){
$(".fuckadb").css("display","block")
@xiaokangwang
xiaokangwang / main.go
Created March 8, 2015 04:53
Newton's method for sqrt()
package main
import "fmt"
func main() {
i := 1
var sqr, x, cm float64
sqr = 16
#myCanvas {
border: 1px solid black;
}
@xiaokangwang
xiaokangwang / Markdown.md
Last active January 2, 2016 10:59
本次翻译中定义的术语
English Chinese
Subscriptions 订阅
Label 标签
Stream 节点流
peer 节点
public key 公匙
Inventory lookups 同步请求
Address 地址
Bitmessage 比特信