Skip to content

Instantly share code, notes, and snippets.

@lv7777
lv7777 / levena.evenas.zone
Created November 2, 2016 15:00
bindで権威鯖を作るとき
$ORIGIN levena.evenas. ; 設定するドメイン名を指定
$TTL 86400 ; デフォルトのTTLを1日にする(“1D”のようにも記述可能)
@ IN SOA ns1.example.jp. ns1.levena.evenas. (
2014120901 ; Serial, YYYYMMDDNN
3600 ; Refresh
@lv7777
lv7777 / named_cache_sv.conf
Created November 2, 2016 01:20
bindのキャッシュサーバーとして動かす基本設定
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
@lv7777
lv7777 / ba.sh
Created October 19, 2016 05:51
ね゛た゛ぁ゛ん゛(ねっとり)
oij=("v" "a" "n" "ho" "ten")
#echo $oij
# up is ${oij[0]}
#echo "oij's array length is "${#oij[*]}
function NasiNasiSearch(){
echo "sedの練習をしまつ!w"
lsans=`ls`
for dir in `ls -la | sed -e "/^[^d]/d" | sed -e "/\.$/d" | sed -e "s/^.* //"`
@lv7777
lv7777 / alice.sh
Created October 19, 2016 02:49
やっぱりアリスの作るブラウニーはうまいな(伝家の宝刀)
#!bin/sh
oij=("v" "a" "n" "ho" "ten")
#echo $oij
# up is ${oij[0]}
#echo "oij's array length is "${#oij[*]}
function NasiNasiSearch(){
echo "sedの練習をしまつ!w"
@lv7777
lv7777 / rtx1100.conf
Created October 4, 2016 15:26
roterboardとRTX1100の接続のconfig。(yamaha側)
#8 3 91 6
ip route default gateway pp 1
ip route 8.8.8.0/24 gateway pp 1
ip route 192.168.88.0/24 gateway 192.168.77.2
ip lan1 address 192.168.55.1/24
ip lan3 address 192.168.77.1/24
pp disable all
pp select 1
pp always-on on
pppoe use lan2
@lv7777
lv7777 / upstream_yamaha.conf.rsc
Created October 4, 2016 15:08
routerboardとRTX1100をつなぐときのrouterboard側のconf
# jan/02/1970 06:27:49 by RouterOS 6.22
# software id = RIVA-0P5Q
#
/interface bridge
add admin-mac=4C:5E:0C:F5:7B:73 auto-mac=no name=bridge-local
/interface ethernet
set [ find default-name=ether1 ] name=ether1-gateway
set [ find default-name=ether2 ] name=ether2-master-local
set [ find default-name=ether3 ] master-port=ether2-master-local name=\
ether3-slave-local
@lv7777
lv7777 / backup.sh
Last active September 25, 2016 05:06
help機能を付けるなどした
#! bin/bash
#backupsin.sh
#引数を学んだものだけが作成できる真のshellscript
#$x(回りに名にもなし)は展開される。""で囲んだ文字列も展開される。両者は基本的に>同じ
# bashもjsみたいに最初に関数を書いて定義してから実行しないとダメ。
function hp {
@lv7777
lv7777 / timer.ps1
Created August 20, 2016 12:54
3分測って3分経ったことを表示させる謎の何かです
$timer_new=New-Object System.Diagnostics.StopWatch;$timer_new.start();Start-Sleep -s 180;$timer_new.stop();echo $timer_new.Elapsed
seccan中にとったメモ
インタポール・・・190か国の警察の集まり
国際手配関係。
チューター報告
プロトコルスタック自作
@lv7777
lv7777 / fetch.js
Created August 7, 2016 17:37
fetch()
var hear=new Headers({
"Content-Type":"image/png",
"Accept":"*/*",
"Connection":"keep-alive"
})
var myinit2={
method:"GET",
header:hear
}
fetch("/img/icons/logo.png",myinit2).then(response=>{if(response.ok){return response.blob();}}).then(data=>console.log(URL.createObjectURL(data)));