Skip to content

Instantly share code, notes, and snippets.

View tossh0095's full-sized avatar
🔥
on fire

tossh tossh0095

🔥
on fire
View GitHub Profile
# 1. test
Hello, my gist !
@tossh0095
tossh0095 / 000sw01.20161225.log
Created December 25, 2016 15:33
monitor port behavior test configuration
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname 000sw01
!
boot-start-marker
@tossh0095
tossh0095 / juniper_prase_firewall_log.pl
Last active December 1, 2016 06:35
Perlワンライナー
#
#
# JuniperのFirewall Logをicmpを除いてstart_time,duration(sec),src_ip,dst_ip,protocol,dst_port_numで出力する
# なぜ空白区切りでなくキャプションにしたかというと,"service=msrpc 何たら 何たら"みたいなログがあり、
# 空白区切りが厳密にはできなかったからである・・・。
#
# TODO:
# キャプション用の正規表現を成形する。
# -> 正規表現のマッチが適当グリーディングマッチにしたりしなかったり、区切りごとの文字をどこまで使うかがバラバラなのを整理する
#
@tossh0095
tossh0095 / file0.txt
Created July 21, 2015 01:36
rubygemsに登録するときにはspec.metadata['allowed_push_host']あたりを消しておこう ref: http://qiita.com/tossh/items/08e7165e730dbc1a0e2e
$ bundle exec rake release
sample_gem 0.1.0 built to pkg/sample_gem-0.1.0.gem.
Tag v0.1.0 has already been created.
rake aborted!
ERROR: "https://rubygems.org" is not allowed by the gemspec, which only allows "TODO: Set to 'http://mygemserver.com'"
Pushing gem to https://rubygems.org...
Tasks: TOP => release => release:rubygem_push
(See full trace by running task with --trace)
#gem削除
gem yank sample_gem -v 0.1.0
@tossh0095
tossh0095 / git
Last active August 29, 2015 14:24
# 直前のコミットまですべてのファイルの状態を戻す
git reset --hard HEAD
#最初のコミットに対して歴史圧縮
git rebase -i HEAD~2 --root

Switching

spanning-tree

! spanningの情報を出力する。
# show spanning-tree vlan xx

ether-channel

@tossh0095
tossh0095 / tmux.md
Created July 8, 2015 15:23
tmux command memo
set-window-option syncronize-panes on #pane間でコマンド同期
set-window-option syncronize-panes on #pane間でコマンド同期解除
gem install パッケージ名 -r -p http://username:password@proxy.hostname:port
@tossh0095
tossh0095 / template.html
Created June 29, 2015 07:20
html_template
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="">