Skip to content

Instantly share code, notes, and snippets.

Avatar

Francis Luong (Franco) francisluong

View GitHub Profile
@francisluong
francisluong / cfm_latency.junos.txt
Created Apr 9, 2014
JUNOS: How to Collect Latency from CFM
View cfm_latency.junos.txt
{master}
fluong@network-router-re0> show configuration protocols oam | display set | grep inter | trim 108
Apr 09 18:13:47
router2-0/0/0-router-0/1/2 mep 2 interface xe-0/1/2
fluong@network-router-re0> monitor ethernet delay-measurement two-way maintenance-association router2-0/0/0-router-0/1/2 maintenance-domain md-WWAN
Two-way ETH-DM request to 5c:5e:ab:da:07:cb, Interface xe-0/1/2.32767
DMR received from 5c:5e:ab:da:07:cb Delay: 3791 usec Delay variation: 0 usec
DMR received from 5c:5e:ab:da:07:cb Delay: 3797 usec Delay variation: 6 usec
DMR received from 5c:5e:ab:da:07:cb Delay: 3798 usec Delay variation: 1 usec
@francisluong
francisluong / compress.var.log.junos.txt
Last active Aug 29, 2015
JUNOS: compress /var/log/*
View compress.var.log.junos.txt
file archive compress source /var/log/* destination /var/tmp/re0-var-log.tgz
request routing-engine login other
file archive compress source /var/log/* destination re0:/var/tmp/re1-var-log.tgz
@francisluong
francisluong / csv_config_audit.vb
Last active Aug 29, 2015
Excel VBA to Format CSV into a Table with some conditional formats
View csv_config_audit.vb
Sub csv_config_audit_2()
'
' csv_config_audit_2 Macro
'
'
Range("A1").CurrentRegion.Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1").CurrentRegion, , xlYes).Name = _
"Table1"
Range("Table1[#All]").Select
@francisluong
francisluong / word_vba.vb
Created Apr 22, 2014
Word VBA - Franco's Macros
View word_vba.vb
Sub AAA_underline_uber()
'
' underline_fluong Macro
' Find instances of text from searchTextArray which are not underlined and:
' - extend selection to end of line`
' - underline it
'
View ewan_description_3.vb
Sub ewan_description_3()
Columns("B:G").Select
Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("1:1").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A1").Select
ActiveCell.FormulaR1C1 = "mx"
Range("B1").Select
@francisluong
francisluong / netconf_show_config_proto_l2circuit_nei
Created Jun 19, 2014
Juniper Netconf: request to get a partial configuration
View netconf_show_config_proto_l2circuit_nei
<rpc message-id="1002 Tue Jun 17 23:25:48 -0400 2014">
<get-config>
<source><candidate/></source>
<filter type="subtree">
<configuration>
<protocols>
<l2circuit>
<neighbor>
<name>1.2.3.4/name>
</neighbor>
@francisluong
francisluong / netconf_cfm_delay_measurement
Created Jun 19, 2014
Juniper Netconf: CFM monitor ethernet delay measurement
View netconf_cfm_delay_measurement
<rpc>
<request-monitor-ethernet-delay-measurement>
<two-way/>
<maintenance-domain>md-NAME</maintenance-domain>
<maintenance-association>ma-NAME</maintenance-association>
<mep>2</mep>
</request-monitor-ethernet-delay-measurement>
</rpc>
View excel_cfm_latency_table_format.vba
Sub cfm_latency_report()
'
' cfm_latency_report Macro
'
'
Range("A1").CurrentRegion.Select
ActiveSheet.ListObjects.Add(xlSrcRange, Range("A1").CurrentRegion, , xlYes).Name = _
"Table1"
Range("Table1[#All]").Select
View mac_bashrc
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
Yellow='\[\e[0;33m\]' # Yellow
Blue='\[\e[0;34m\]' # Blue
Purple='\[\e[0;35m\]' # Purple
View .vimrc
:set ai
:set softtabstop=4 shiftwidth=4 expandtab
:set pastetoggle=<f5>
:nmap <C-n> :noh<CR>
:nmap <C-.> :bn<CR>
:nmap <C-,> :bp<CR>
:nmap <S-Tab> <<
:nmap <Tab> >>
:imap <S-Tab> <C-d>
:syntax enable
You can’t perform that action at this time.