- 高谷雄貴
- ペパボではじっぱーと呼ばれてます
- @buty4649
- http://github.com/buty4649/
- 2014/02にペパボに入社
- 前職ではSEとかSIerとか言われることをやっていた
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
rrdtool create nighttime.rrd -b $(date -d "1 years ago" +%s) DS:night:GAUGE:600:0:U RRA:MAX:0.5:1:576 RRA:MAX:0.5:6:432 RRA:MAX:0.5:24:540 RRA:MAX:0.5:288:450 | |
perl -MRRDs -e ' | |
$e=time; | |
$s=$e-3600*24*365; | |
while($s<=$e) { | |
$d=($s + 9 * 3600)%(24 * 3600); | |
if($d >= (19 * 3600) || $d <= (6 * 3600)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class dstat_plugin(dstat): | |
def __init__(self): | |
self.nick = ('latency',) | |
self.type = 'd' | |
self.width = 4 | |
self.scale = 34 | |
self.diskfilter = re.compile('^(dm-[0-9]+|md[0-9]+|[hs]d[a-z]+[0-9]+)$') | |
self.open('/proc/diskstats') | |
self.cols = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
my @t = qw/1 5 3 7 2 6 10 14 15 4 9 8 12 13 11 0/; | |
while(<STDIN>) { | |
s/\e\[0m//g; | |
s/\e\[(\d\d)m/"\x03".$t[$1-30]/ge; | |
print; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
var FLOOR_NUM = floors.floorNum; | |
var elevator1 = elevators[0]; // 初号機 | |
var elevator2 = elevators[1]; // 弐号機 | |
elevator1 | |
.on("idle", function() { | |
elevator1.goToFloor(0); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; | |
then | |
echo "Usage $(basename $0) <host>" | |
exit 1 | |
fi | |
TARGET="$1" | |
MACKEREL_APIKEY="API Key" |
$ date
2016年 1月 24日 日曜日 01:13:14 JST
$ sudo smartctl -a /dev/sde
smartctl 6.4 2015-06-04 r4109 [x86_64-linux-3.17.8-gentoo-r1] (local build)
Copyright (C) 2002-15, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: SandForce Driven SSDs
Device Model: ADATA SSD S510 120GB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Helix (https://github.com/MakotoKurauchi/helix)", | |
"author": "@pluis9" | |
}, | |
[ | |
"~\n\n\n\n\n\n\n\n\n`", | |
"!\n\n\n\n\n\n\n\n\n1", | |
"@\n\n\n\n\n\n\n\n\n2", | |
"#\n\n\n\n\n\n\n\n\n3", |
GR-CITRUSにKernel#shiftOutを実装したので、SN74HC595Nを使って制御してみた。
動画: https://youtu.be/y6mvuK9XPx8
GR-CITRUS | SN74HC595N | ||
---|---|---|---|
5V | -> | Vcc | |
QA~QH | -> LEDへ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$color1=`tput setaf 7;tput setab 21`; | |
$color2=`tput setaf 7;tput setab 19`; | |
$color3=`tput setaf 7;tput setab 17`; | |
$clear=`tput sgr0`; | |
$the_cow = <<EOC; | |
$thoughts | |
$thoughts | |
$color3 $clear | |
$color3 $color2 $color1.-.$color2 $color3 $clear | |
$color3 $color2 $color1.' '.$color2 $color3 $clear |