This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 longkai | |
* | |
* The software shall be used for good, not evil. | |
*/ | |
package android.support.animation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# A simple golang(go 1.5+) cross compile script. | |
# Usage `gocp.sh [os] [version]`, default OS linux/mac/freebsd/window 64 binary with bzip2 format or zip(only windows) compression format with `latest` version. | |
# output pattern `os-arch-version.tar.bz2` or `os-arch-version.zip` | |
name=${PWD##*/} | |
v=$2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include "stack.h" | |
#define STACK_SIZE 5 // or larger, e.g. 1024 ptrs | |
#define PTR_SIZE sizeof(uintptr_t) | |
static void err_sys(const char *msg); | |
void stack_init(Stack *s) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 longkai | |
* | |
* The software shall be used for good, not evil. | |
*/ | |
package com.example.widget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Dockerfile for shadowsocks-libev | |
# | |
FROM alpine | |
MAINTAINER longkai <i@xiaolongtongxue.com> | |
ENV SERVER_ADDR 0.0.0.0 | |
ENV SERVER_PORT 8388 | |
ENV PASSWORD= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install -y \ | |
vim \ | |
tmux \ | |
zsh \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
gnupg-agent \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
repo=azk8s.cn | |
function rip() { | |
echo $1 | awk -F '/' '{ | |
{ | |
if (NF == 1) | |
print "dockerhub." repo "/library/" $0 | |
else if ($1 == "docker.io") | |
print "dockerhub." repo "/" substr($0, length($1)+2, length($0)-length($1)) |
OlderNewer