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
func FlagReflection(args []string) error { | |
opts := map[string]interface{}{} | |
flags := flag.NewFlagSet("xxxx", flag.ContinueOnError) | |
opts["vcpu"] = flags.Int("vcpu", int(mdst.MinVcpu), "") | |
opts["memory_gb"] = flags.Int("memory_gb", int(mdst.MinMemoryGb), "") | |
if err := flags.Parse(args); err != nil { | |
return err | |
} | |
flags.Visit(func(f *flag.Flag) { | |
v := reflect.ValueOf(mdst) |
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
# Linux/x86_64 3.10.0-514.el7.x86_64 | # Linux/x86_64 3.10.0-514.10.2.el7.ce | |
# CONFIG_X86_NUMACHIP is not set | CONFIG_X86_NUMACHIP=y | |
> # CONFIG_BT_WILINK is not set | |
# CONFIG_NET_9P is not set | CONFIG_NET_9P=m | |
> CONFIG_NET_9P_VIRTIO=m | |
> # CONFIG_NET_9P_RDMA is not set | |
> # CONFIG_NET_9P_DEBUG is not set | |
# CONFIG_TI_ST is not set | CONFIG_TI_ST=m | |
# CONFIG_SCSI_AIC7XXX is not set | CONFIG_SCSI_AIC7XXX=m | |
> CONFIG_AIC7XXX_CMDS_PER_DEVICE=32 |
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 ( | |
"fmt" | |
"os" | |
"github.com/Azure/go-ansiterm/winterm" | |
) | |
func main() { |
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
curl -O https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz | |
tar xf protobuf-2.6.1.tar.gz | |
cd protobuf-2.6.1 | |
LDFLAGS="-static-libgcc -static-libstdc++" ./configure --disable-shared --prefix=/usr/local/protobuf-2.6.1 | |
cd src | |
make protoc | |
make install |
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
// +build: linux,cgo | |
package main | |
/* | |
#cgo pkg-config: libbcc | |
#include <bcc/bpf_common.h> | |
#include <bcc/libbpf.h> | |
*/ | |
import "C" |
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 | |
// #include <arpa/inet.h> | |
import "C" | |
import ( | |
"encoding/binary" | |
"fmt" | |
"net" | |
"unsafe" | |
) |
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 dropbox | |
import ( | |
"log" | |
"net/http" | |
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox" | |
"github.com/dropbox/dropbox-sdk-go-unofficial/dropbox/files" | |
) |
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 | |
cat <<EOF | radclient 192.168.56.150 auth testing123 | |
User-Name="81901234567@apn1", | |
NAS-IP-Address=127.0.0.1, | |
NAS-Identifier="NAS1", | |
NAS-Port-Type=Virtual, | |
Service-Type=Framed-User, |
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
# New build started | |
/var/lib/jenkins/jobs/citest/branches/master/builds/ CREATE,ISDIR 28 | |
# log modified | |
/var/lib/jenkins/jobs/citest/branches/master/builds/28/ MODIFY log | |
# The last log update | |
/var/lib/jenkins/jobs/citest/branches/master/builds/28/ CLOSE_WRITE,CLOSE log | |
# a build stage finished |
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
// +build linux | |
package main | |
import ( | |
"fmt" | |
"net" | |
"os" | |
"syscall" |