Skip to content

Instantly share code, notes, and snippets.

@nemith
nemith / Usage
Last active December 20, 2015 22:38
homestar:cm-10.2 bbennett$ python ~/prop.py --branch cm-10.2 > .repo/local_manifests/propritary_files.xml
package main
import "os"
//import "log"
import "io"
import "time"
import "fmt"
import "bytes"
import "runtime"
@nemith
nemith / disable-unconfigured-ifd.slax
Created October 20, 2013 23:35
Junos Commit script to automatically disable all non-defined interfaces.
version 1.0;
ns junos = "http://xml.juniper.net/junos/*/junos";
ns xnm = "http://xml.juniper.net/xnm/1.1/xnm";
ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";
import "../import/junos.xsl";
/* Whitelist of interfaces that are eligble to be automatically disabled. Add
or remove what is needed */
@nemith
nemith / Host w ping
Created January 2, 2014 21:52
Broken SRX
bbennett@homestar:~$ ifconfig en0
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=8<VLAN_HWTAGGING>
ether 90:2b:34:31:2b:46
inet6 fe80::922b:34ff:fe31:2b46%en0 prefixlen 64 scopeid 0x4
inet 172.16.1.51 netmask 0xffffff00 broadcast 172.16.1.255
nd6 options=1<PERFORMNUD>
media: <unknown type> (1000baseT <full-duplex,flow-control>)
status: active
bbennett@homestar:~$
@nemith
nemith / Output
Last active January 2, 2016 06:39
Juniper website fail
Code Count Pecetage
200: 65 65.0%
404: 35 35.0%
bbennett@strongbad:~/Devel/go/src/lime/build(git:master!)<2>$ make
[ 27%] Built target Oniguruma
[ 55%] Built target Python3
2014/01/15 11:31:46 Added license to ../build/CMakeFiles/2.8.12.1/CompilerIdC/CMakeCCompilerId.c
2014/01/15 11:31:46 done: 5:1: illegal character U+0023 '#'
[ 72%] Built target fix
[ 75%] Built target godep
[100%] Built target lime
# lime/backend
../../backend/view.go:66: cannot use func literal (type func(string)) as type text.OnChangeCallback in function argument
@nemith
nemith / IOS XR RPC
Last active August 29, 2015 13:57
Junos vs IOSXR
<?xml version="1.0" encoding="UTF-8"?>
<rpc message-id="106" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<get>
<filter>
<AdminOperational>
<PlatformInventory>
<RackTable>
<Rack>
<Naming>
<Name>0</Name>
bbennett@annav-t420s:~<1>$ python jsontest.py
integer,name
45,Test One
76,Test Two
42,Test Three
Pin #
-----
1 Extruder Stepper 1 (Blue)
2 Extruder Stepper 2 (Red)
3 Extruder Stepper 4 (Black)
4 Extruder Stepper 3 (Green)
5 Thermister 1
6 Thermister 2 + Fan2 1 ??
7 Heater 1 + Fan2 2
8 Heater 2
 bbennett  ~  tcpdump -i en0 -At port 6667
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on en0, link-type EN10MB (Ethernet), capture size 65535 bytes
IP 192.168.1.97.54747 > weber.freenode.net.6667: Flags [S], seq 898809603, win 65535, options [mss 1460,nop,wscale 4,nop,nop,TS val 694395293 ecr 0,sackOK,eol], length 0
E..@..@.@./ ...a..'*....5............w.............
)c..........
IP weber.freenode.net.6667 > 192.168.1.97.54747: Flags [S.], seq 4263177533, ack 898809604, win 14480, options [mss 1460,sackOK,TS val 1391350058 ecr 694395293,nop,wscale 6], length 0
E .<[email protected].....'*...a.......=5.....8.Dh.........
R.Q*)c......
IP 192.168.1.97.54747 > weber.freenode.net.6667: Flags [.], ack 1, win 8235, options [nop,nop,TS val 694395336 ecr 1391350058], length 0