Skip to content

Instantly share code, notes, and snippets.

View buty4649's full-sized avatar

buty4649 buty4649

View GitHub Profile
def exec
pids = []
pid = Process.fork do
Exec.execve_override_procname(ENV.to_hash, "sleep", "/bin/sleep", "10")
end
pids << pid
puts "sleep(pid: #{pid})"
th = SignalThread.trap(:INT, {detailed:true}) do |info|
Script started on Fri 24 Jan 2020 11:09:46 PM JST
]0;root@api001: ~root@api001:~# bash servergroup.py
+ nyah_servergroup_add_member.py a0070db6-627c-47b4-b1ed-8acc8d2f30cf b535478d-fa6b-4068-8fd4-1b653c1d0d71
Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future.
Option "notification_driver" from group "DEFAULT" is deprecated. Use option "driver" from group "oslo_messaging_notifications".
Could not load nova.openstack.common.notifier.rpc_notifier
Could not load nova.openstack.common.notifier.rpc_notifier
/usr/lib/python2.7/dist-packages/pymysql/cursors.py:158: Warning: '@@tx_isolation' is deprecated and will be removed in a future release. Please use '@@transaction_isolation' instead
result = self._query(query)
❯ docker run -it --rm centos:7 bash
[root@ebd7f940179c /]# mkdir test
[root@ebd7f940179c /]# cd test
[root@ebd7f940179c test]# chmod 000 .
[root@ebd7f940179c test]# find /tmp
/tmp
/tmp/.Test-unix
/tmp/ks-script-rnBCJB
/tmp/.font-unix
/tmp/.XIM-unix
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@buty4649
buty4649 / sakura.vim
Last active November 1, 2018 05:34
サクラエディタ風のカラースキーム
" Vim color file
" Maintainer: Your name <youremail@something.com>
" Last Change:
" URL:
" cool help screens
" :he group-name
" :he highlight-groups
" :he cterm-colors
@buty4649
buty4649 / dstat_snat.py
Created June 27, 2018 12:54
dstatでsnat netnsごとにトラフィックを見る奴
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):
@buty4649
buty4649 / led.cow
Created June 6, 2018 08:19
cowsayのLED
$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

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 March 6, 2018 10:08
keyboard-layout-editor.com のHelixテンプレート
[
{
"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 / infra_auto.md
Created October 9, 2014 15:13
ITインフラ業務自動化現状確認会の資料

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

自己紹介

  • 高谷雄貴
  • 2014/02にペパボに入社
    • 前職ではSEとかSIerとか言われることをやっていた