Skip to content

Instantly share code, notes, and snippets.

View mochipon's full-sized avatar
🏠
Working from home

Masaki Tagawa mochipon

🏠
Working from home
View GitHub Profile
#!/usr/bin/env python2
# mackerel-agent.conf:
#
# [plugin.metrics.cisco]
# command = "/usr/bin/python /home/guestshell/mackerel-cisco_snmp.py 1 2 8 9 10 11 12 13 14"
import commands
from datetime import datetime
import sys
@mochipon
mochipon / requirements.txt
Last active February 21, 2018 16:41
checkipam
gitdb2==2.0.3
GitPython==2.1.8
joblib==0.11
slackweb==1.0.5
smmap2==2.0.3
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
from datetime import datetime
import json
import os
import time
# https://github.com/nicmcd/vcgencmd
# pip3 install git+https://github.com/nicmcd/vcgencmd.git
import vcgencmd
@mochipon
mochipon / mackerel-plugin-coretemp.py
Created March 25, 2017 08:08
Monitor CPU temperature in Mackerel (using kernel driver coretemp)
#!/usr/bin/env python3
# -*- encoding: utf-8 -*-
from datetime import datetime
import glob
import json
import os
import re
import sys
import time
@mochipon
mochipon / telnet-auto.sh
Last active January 13, 2017 09:21
The traditional method of automating telnet sessions meets macOS Keychain
#!/bin/sh
#### This script enables automated telnet login using macOS Keychain.
#### In addition, automatically entering privilege EXEC mode is available.
####
#### Copyright (c) 2017 Masaki Tagawa
#### Released under the MIT license
#### http://opensource.org/licenses/mit-license.php
set -ef -o pipefail
@mochipon
mochipon / syslog.lua
Created August 11, 2015 23:45
YAMAHA ルータで NAT テーブルと DHCP サーバのプールの使用状況を syslog に吐き出すヤツ
--------------------------## 設定値 ##--------------------------------
-- 監視間隔(1 - 864000 秒)
idle_time = 30
-- 使用状況を監視する IP マスカレードの NAT ディスクリプタ番号(1 - 2147483647)
nat_descriptor = 1000
-- メールの送信に失敗した時に出力する SYSLOG のレベル(info, debug, notice)
log_level = "info"
diff -ru a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
--- a/package/libs/openssl/Makefile 2013-05-03 10:09:19.615819083 +0900
+++ b/package/libs/openssl/Makefile 2013-04-19 20:55:00.471361366 +0900
@@ -75,7 +75,7 @@
OPENSSL_NO_CIPHERS:= no-idea no-md2 no-mdc2 no-rc5 no-sha0 no-smime \
no-rmd160 no-aes192 no-ripemd no-camellia no-ans1 no-krb5
-OPENSSL_OPTIONS:= shared no-ec no-err no-hw no-threads zlib-dynamic no-sse2
+OPENSSL_OPTIONS:= shared no-err no-hw no-threads zlib-dynamic no-sse2