- 动态库命名规则:lib<包名>.so
- 基于gomobile的ca3c58166ed802c9810ffc499b01bc1cd2e0153a commit进行修改
- 修改文件:
${GOPATH}/src/golang.org/x/mobile/cmd/gomobile/bind_androidapp.go
- 修改完成后,执行
go install -v golang.org/x/mobile/cmd/gomobile
重新编译并安装gomobile二进制文件
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
package main | |
import ( | |
"log" | |
"net/http" | |
"os" | |
"os/signal" | |
"syscall" | |
"github.com/cloudflare/tableflip" |
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 | |
set -x | |
kubeadm reset --force | |
yum remove -y kubeadm kubectl kubelet kubernetes-cni kube* | |
yum autoremove -y | |
[ -e ~/.kube ] && rm -rf ~/.kube | |
[ -e /etc/kubernetes ] && rm -rf /etc/kubernetes | |
[ -e /opt/cni ] && rm -rf /opt/cni |
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
# list physical network interfaces | |
ls -l /sys/class/net/ | egrep -v 'virtual|total' | awk '{print $NF}' | awk -F/ '{print $NF}' | |
# list physical network interfaces mac addresses | |
for i in $(ls -l /sys/class/net/ | egrep -v 'virtual|total' | awk '{print $NF}' | awk -F/ '{print $NF}'); do ip addr show dev $i | awk '/ether/{print $2}'; done |
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 | |
set -e | |
docker_install() { | |
type docker || curl -sSL https://get.daocloud.io/docker | sh | |
systemctl enable docker | |
systemctl start docker | |
# docker mirrors for china | |
cat << EOF > /etc/docker/daemon.json |
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
// Client side C/C++ program to demonstrate Socket programming | |
#include <stdio.h> | |
#include <sys/socket.h> | |
#include <arpa/inet.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#define PORT 8080 | |
#define MAXLINE 4096 |
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
package main | |
import "log" | |
func MergeSort(a []int) []int { | |
l := len(a) | |
if l <= 1 { | |
return a | |
} |
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
-N subnet hash:net | |
-A subnet 0.0.0.0/8 | |
-A subnet 10.0.0.0/8 | |
-A subnet 127.0.0.0/8 | |
-A subnet 169.254.0.0/16 | |
-A subnet 172.16.0.0/12 | |
-A subnet 192.168.0.0/16 | |
-A subnet 224.0.0.0/4 | |
-A subnet 240.0.0.0/4 |
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 | |
# PNG2AppIcon-iOS.sh | |
# | |
# | |
# Created by scue on 2019/3/7. | |
# | |
img_names=( | |
Icon1024.png |
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
package daphne | |
import ( | |
"context" | |
"log" | |
"os" | |
"os/exec" | |
"sync" | |
"time" | |
) |
NewerOlder