Skip to content

Instantly share code, notes, and snippets.

View jinleileiking's full-sized avatar
🐰
Gopher, Rubist, Phper, Now learning Rust, Linuxer, Vimer, Father of 2 girl

jinleileiking jinleileiking

🐰
Gopher, Rubist, Phper, Now learning Rust, Linuxer, Vimer, Father of 2 girl
View GitHub Profile

system to nand

mlo & uboot from sdcard

mmc rescan ; nand erase 0x0 0x280000 ; nandecc hw 2; fatload mmc 0 0x81000000 MLO_nand; nand write 0x81000000 0x0 0x20000; nand write 0x81000000 0x20000 0x20000;

@jinleileiking
jinleileiking / gist:3057912
Created July 6, 2012 03:35
linux里优先使用wlan
e iproute2

P330  # cat /etc/iproute2/rt_tables 
#
# reserved values
#
255	local
254	main
253	default
#!/bin/bash
curl -XDELETE http://localhost:8200/history
curl -XPOST http://localhost:8200/history/ -d'
{
"settings" : {
"analysis" : {
"analyzer" : {
"pinyin_analyzer" : {
"tokenizer" : "my_pinyin",
curl -XPUT localhost:8200/_template/template_1 -d '
{
"template" : "history",
"settings" : {
"analysis" : {
"analyzer" : {
"pinyin_analyzer" : {
"tokenizer" : "my_pinyin",
"filter" : ["word_delimiter","nGram"]
}
@jinleileiking
jinleileiking / install.sh
Last active December 17, 2015 03:39
gentoo_install_with_rescuecd
#############################################################
# 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
Section "Device"
Identifier "intel_dev0"
Driver "intel"
BusID "PCI:0:2:0"
Option "ZaphodHeads" "VGA1"
Screen 0
EndSection
Section "Device"
Identifier "intel_dev1"
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
@jinleileiking
jinleileiking / GentooInstall.sh
Last active August 6, 2021 15:57
Gentoo Install Script with Rescue CD
fdisk /dev/sda
# n
# 1
# +32M
# n
# 2
# +512M
# n
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)
@jinleileiking
jinleileiking / grpc_middleware_logger.go
Created June 28, 2017 14:03
gpc + middleware + zap + log rotate
package main
import (
"fmt"
"log"
"net"
// "os"
// "path"
"os"