Skip to content

Instantly share code, notes, and snippets.

buty4649 buty4649

Block or report user

Report or block buty4649

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@buty4649
buty4649 / dstat_snat.py
Created Jun 27, 2018
dstatでsnat netnsごとにトラフィックを見る奴
View dstat_snat.py
class dstat_plugin(dstat):
def __init__(self):
self.nick = ('#recv', '#send')
self.type = 'd'
self.width = 5
self.scale = 1024
self.cols = 2
def vars(self):
View led.cow
$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
View README.md

GR-CITRUSにKernel#shiftOutを実装したので、SN74HC595Nを使って制御してみた。

動画: https://youtu.be/y6mvuK9XPx8

接続方法

GR-CITRUS SN74HC595N
5V -> Vcc
QA~QH -> LEDへ
@buty4649
buty4649 / keyboard-layout_helix_default.json
Last active Mar 6, 2018
keyboard-layout-editor.com のHelixテンプレート
View keyboard-layout_helix_default.json
[
{
"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",
@buty4649
buty4649 / smartctl.md
Created Jan 23, 2016
ADATAのSSDのSMART
View smartctl.md
$ 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
@buty4649
buty4649 / mackerel-snmp-agent.sh
Created Dec 22, 2015
Ciscoスイッチ向けmackerel agentスクリプト
View mackerel-snmp-agent.sh
#!/bin/bash
if [ -z "$1" ];
then
echo "Usage $(basename $0) <host>"
exit 1
fi
TARGET="$1"
MACKEREL_APIKEY="API Key"
View elevator4.js
{
init: function(elevators, floors) {
var FLOOR_NUM = floors.floorNum;
var elevator1 = elevators[0]; // 初号機
var elevator2 = elevators[1]; // 弐号機
elevator1
.on("idle", function() {
elevator1.goToFloor(0);
});
@buty4649
buty4649 / ansi2irc-color.pl
Created Jan 23, 2015
ANSIカラーコードからIRCカラーコードに変換する奴
View ansi2irc-color.pl
#!/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;
@buty4649
buty4649 / dstat_disk_latency.py
Created Nov 10, 2014
dstatでディスクレイテンシ取るやつ
View dstat_disk_latency.py
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
@buty4649
buty4649 / infra_auto.md
Created Oct 9, 2014
ITインフラ業務自動化現状確認会の資料
View infra_auto.md

hubotを使ってIRCから便利にする

自己紹介

  • 高谷雄貴
  • 2014/02にペパボに入社
    • 前職ではSEとかSIerとか言われることをやっていた
You can’t perform that action at this time.