e iproute2
P330 # cat /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
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 pub(addr string, f string, name string) error { | |
tlA, err := webrtc.NewTrackLocalStaticSample(webrtc.RTPCodecCapability{MimeType: webrtc.MimeTypeOpus}, "tid-audio-"+name, sidA) | |
if err != nil { | |
panic(err) | |
} | |
if _, err := pc.AddTrack(tlA); err != nil { | |
panic(err) |
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" | |
"log" | |
"net" | |
// "os" | |
// "path" | |
"os" |
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
input { | |
kafka { | |
zk_connect => "10.4.22.121:2181,10.4.22.122:2181,10.4.22.123:2181" | |
group_id => "appgroup" | |
topic_id => "applog" | |
#codec => plain | |
consumer_threads => 64 | |
decorate_events => true | |
reset_beginning => false | |
queue_size => 2000 |
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
Section "Device" | |
Identifier "intel_dev0" | |
Driver "intel" | |
BusID "PCI:0:2:0" | |
Option "ZaphodHeads" "VGA1" | |
Screen 0 | |
EndSection | |
Section "Device" | |
Identifier "intel_dev1" |
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 -XPUT localhost:8200/_template/template_1 -d ' | |
{ | |
"template" : "history", | |
"settings" : { | |
"analysis" : { | |
"analyzer" : { | |
"pinyin_analyzer" : { | |
"tokenizer" : "my_pinyin", | |
"filter" : ["word_delimiter","nGram"] | |
} |
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 | |
curl -XDELETE http://localhost:8200/history | |
curl -XPOST http://localhost:8200/history/ -d' | |
{ | |
"settings" : { | |
"analysis" : { | |
"analyzer" : { | |
"pinyin_analyzer" : { | |
"tokenizer" : "my_pinyin", |
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 <stdint.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
ssize_t get_random() | |
{ | |
int randomData = open("/dev/random", O_RDONLY); | |
int myRandomInteger; | |
size_t randomDataLen = 0; |
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
############################################################# | |
# IN VBOX # | |
# Use nat. # | |
############################################################# | |
passwd | |
############################################################# | |
# IN Putty # | |
# # | |
# telnet vbox in ssh, so you can copy # |
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
############################################################# | |
# IN VBOX # | |
# You need vbox have two link: 1 nat, 2 bridge. # | |
# use networkmanager to setup bridge ip. ping ok.. # | |
# use midori to check nat is ok # | |
# use putty to telnet vbox # | |
############################################################# | |
startx | |
passwd |
NewerOlder