Skip to content

Instantly share code, notes, and snippets.

View itochan's full-sized avatar
๐Ÿฏ

Kazunori Jo itochan

๐Ÿฏ
View GitHub Profile
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
localnet * 255.255.255.0 U 0 0 0 em1
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
@itochan
itochan / snapshot
Last active December 14, 2015 07:18
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'date'
`rsync -a --delete / /tank/backup/kurokami --exclude-from=/home/itochan/rsync_excludes`
# snapshots = `zfs list -H -t snapshot -o name -r tank/backup`.split("\n")
today = Date.today
itochan@kurokami:~% sudo zpool status
pool: tank
state: ONLINE
scan: resilvered 626G in 1h54m with 0 errors on Sun Feb 3 20:29:49 2013
config:
NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
scsi-SATA_WDC_WD20EFRX-68_WD-XXXXXXXXXXXX ONLINE 0 0 0
itochan@airchan:~% cd ้ŽๅŽป/
itochan@airchan:~/้ŽๅŽป% ls (git)-[master]
ๅฟ˜ใ‚Œใ‚‰ใ‚Œใชใ„้ŽๅŽป ใ‚‚ใฃใจๅฟ˜ใ‚Œใ‚‰ใ‚Œใชใ„้ŽๅŽป
ๆ›ดใซๅฟ˜ใ‚Œใ‚‰ใ‚Œใชใ„้ŽๅŽป ใ‚‚ใ†ๅฐ‘ใ—ใงๅฟ˜ใ‚Œใ‚‰ใ‚Œใ‚‹้ŽๅŽป
itochan@airchan:~/้ŽๅŽป% cat * (git)-[master]
ใ‚‚ใ†ๅฐ‘ใ—ใงๅฟ˜ใ‚Œใ‚‰ใ‚Œใ‚‹้ŽๅŽป
ๅฟ˜ใ‚ŒใŸใ•ใ‚ใ‚‹
้ŽๅŽป
ๅฟ˜ใ‚ŒใŸใ•ใ‚ใ‚‹
้ŽๅŽป
NAME PROPERTY VALUE SOURCE
tank/mysql type filesystem -
tank/mysql creation Mon Feb 11 13:19 2013 -
tank/mysql used 53.9M -
tank/mysql available 1.09T -
tank/mysql referenced 53.9M -
tank/mysql compressratio 1.00x -
tank/mysql mounted yes -
tank/mysql quota none default
tank/mysql reservation none default
@itochan
itochan / gist:4942757
Last active December 13, 2015 16:49
MySQLใงext4ใ‹ใ‚‰ZFSใซ็งป่กŒใ™ใ‚‹ใจ121ๅ€้ซ˜้€ŸๅŒ–ใ—ใŸไปถ (ๆณจๆ„ไบ‹้ …: http://twitter.com/i315/status/301583503936614400 http://twitter.com/i315/status/301584082104631296 )
็ตๆง‹ใ‚นใƒˆใƒฌใƒผใ‚ธใฎ็’ฐๅขƒใŒ้•ใ„ใพใ™ใ—ใ€ใ‚ญใƒฃใƒƒใ‚ทใƒฅใ•ใ‚Œใฆใ„ใ‚‹ใจๆ€ใ‚ใ‚Œใ‚‹ใฎใงใใ“ใพใงๅ‚่€ƒใซใ—ใชใ„ใงใใ ใ•ใ„ใ€‚ใ€‚
ใ‚ญใƒฃใƒƒใ‚ทใƒฅ้–ข้€ฃๅ…จใใ„ใ˜ใฃใฆใ„ใชใ„ใฎใงใ“ใ†ใ„ใ†็’ฐๅขƒใงใฏZFSใซ่ผ‰ใ›ใ‚‹ใปใ†ใŒ้€Ÿใ„ใจใ„ใ†่ฉฑใซใชใ‚Šใพใ™ใ€‚
% cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: ST3500418AS Rev: CC34
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: WDC WD20EFRX-68A Rev: 80.0
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20120522-1813
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
#!/usr/bin/env ruby
# coding: utf-8
require "oauth"
require "json"
while true
begin
c = OAuth::Consumer.new("","", {:site => "http://twitter.com"})
t = OAuth::AccessToken.new(c, "", "")