Skip to content

Instantly share code, notes, and snippets.

View tehnerd's full-sized avatar

Nikita V. Shirokov tehnerd

  • Dropbox
  • behind the terminal
View GitHub Profile
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
-> RemoteAddress:Port Forward Weight ActiveConn InActConn
tehnerd@dev-srv2:~$ sudo /tmp/main
Start Test/Example Run
Expected error because we adding existing service : &errors.errorString{s:"Error! errorcode is: 17\n"}
expected error because of lack fwmark 10: &errors.errorString{s:"Error! errorcode is: 3\n"}
done
tehnerd@dev-srv2:~$ sudo ipvsadm -ln
IP Virtual Server version 1.2.1 (size=4096)
@tehnerd
tehnerd / working_with_dates.swift
Last active September 17, 2015 14:19 — forked from benjamintanweihao/working_with_dates.swift
Working with Dates, Calendars in Swift.
// Playground - noun: a place where people can play
import UIKit
// Setup the calendar object
let calendar = NSCalendar.currentCalendar()
// Set up date object
let date = NSDate()
@tehnerd
tehnerd / patch
Created May 20, 2015 20:17
ipvs tunnel client's src copy
tehnerd@iva-nms:~/linux$ git diff -u e639914f7384a36a6aed563961e2a5ba6e417fc7
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 615b20b..12f4c26 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -924,6 +924,7 @@ struct netns_ipvs {
int sysctl_nat_icmp_send;
int sysctl_pmtu_disc;
int sysctl_backup_only;
+ int sysctl_tun_src_client_copy;
// Package bench is a package which contains
// programs of Go Benchmark Competition.
package bench
import (
"bufio"
"errors"
"os"
"strconv"
)
[user]
email = [email protected]
name = tehnerd
[color]
diff = auto
status = auto
branch = auto
[color "status"]
added = green
@tehnerd
tehnerd / gist:98b2e81c295fcf46c158
Created June 17, 2014 12:01
l2vpn single line
tehnerd@tehnerd-test2-devbox5:~/exabgp$ ./sbin/exabgp -d ./etc/exabgp/ibgp4-l2vpn-singleline.txt
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | environment file missing
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | generate it using "exabgp -fi > /home/tehnerd/exabgp/etc/exabgp/exabgp.env"
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | reactor | Performing reload of exabgp 3.3.2
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | loading | neighbor 192.168.201.2 {
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | loading | process parsed-route-backend {
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | loading | receive-routes;
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | loading | run etc/exabgp/processes/syslog-1.py;
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | loading | }
Tue, 17 Jun 2014 15:49:02 | INFO | 21665 | configuration | loading |
@tehnerd
tehnerd / gist:a088a3b2c6c68c1b6aa7
Created June 16, 2014 09:22
exabgp-dev l2vpn debug
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | environment file missing
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | generate it using "exabgp -fi > /home/tehnerd/exabgp/etc/exabgp/exabgp.env"
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | reactor | Performing reload of exabgp 3.3.2
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading | neighbor 192.168.201.2 {
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading | process parsed-route-backend {
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading | receive-routes;
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading | run etc/exabgp/processes/syslog-1.py;
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading | }
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading |
Mon, 16 Jun 2014 13:09:30 | INFO | 27443 | configuration | loading |
@tehnerd
tehnerd / gist:b5cdf08f0c38c8dfbae1
Created June 11, 2014 15:53
exabgp l2vpn debug output
tehnerd@tehnerd-test2-devbox5:~$ cat ibgp4-l2vpn.txt
neighbor 192.168.201.2 {
process parsed-route-backend {
receive-routes;
run etc/exabgp/processes/syslog-1.py;
}
description "parsing l2vpn vpls routes";
router-id 192.168.201.1;
local-address 192.168.201.1;