Skip to content

Instantly share code, notes, and snippets.

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

Shotaro Takahashi mamemomonga

🏠
Working from home
View GitHub Profile
@mamemomonga
mamemomonga / php-downloader.pl
Created May 2, 2014 02:14
phpのソースの最新バージョンを取得する
#!/usr/bin/env perl
use strict;
use warnings;
my $curl='curl';
sub php_latest {
my $release=shift;
my $atom=`$curl http://www.php.net/releases/feed.php`;
while( $atom=~m#<link rel="enclosure" title="([^"]+)" href="([^"]+)">#mg ) {
@mamemomonga
mamemomonga / TumblrActivityThumbnailEnlarger.user.js
Last active March 30, 2016 09:49
[Firefox+Greasemonkey, Chrome] Tumblr Activityページの「最新メモ」サムネイル画像が大きくなります
// ==UserScript==
// @name TumblrActivityThumbnailEnlarger
// @description Tumblr Activityページの「最新メモ」サムネイル画像が大きくなります
// @namespace https://gist.github.com/mamemomonga/11439dd4e20ed852ab78
// @include http://www.tumblr.com/blog/*/activity
// @include https://www.tumblr.com/blog/*/activity
// @version 1.01
// @grant none
// ==/UserScript==
@mamemomonga
mamemomonga / .vimrc
Created July 8, 2014 08:49
シンプルなvimrc
syntax on
set wildmenu
set history=100
set number
"set list
set scrolloff=5
"set nobackup
"set backupdir=/tmp
@mamemomonga
mamemomonga / .screenrc
Created July 8, 2014 08:51
シンプルなscreenrc
hardstatus alwayslastline "%H [%02c] %`%-w%{=b bw}%n %t%{-}%+w"
vbell off
bind s
bind ^U encoding utf8
bind ^E encoding euc
startup_message off
autodetach on
defscrollback 8192
@mamemomonga
mamemomonga / clone_virtual_machine.sh
Last active August 29, 2015 14:03
VMware ESXi Tech Support Mode(SSH)で仮想マシンをクローンする
#!/bin/ash
# ESXi Tech Support Mode(SSH)で仮想マシンをクローンする。
# コピー先のディスクイメージはThin Provisioning
# 一つのディレクトリにまとまっている必要がある。
# 仮想マシンは /vmfs/volumes/以下に [DATASTORE]/[VM] という形で存在しているので
# データストア: DS1にあるVM1をDS2のVM2としてクローンする場合は
# clone_virtual_machine.sh "DS1/VM1" "DS2/VM2"
# と実行する。クローン後は上記の例のVM2の名前でIntentoryに登録される。
@mamemomonga
mamemomonga / gist:36e4b517dd4316a122ae
Last active July 11, 2017 02:38
Juniper EX2200 junosメモ

EX2200 Junosメモ

CLIからShellへ

> start shell

ShellからCLIへ

% cli
@mamemomonga
mamemomonga / gist:6aacce6761ecff1b166b
Last active August 29, 2015 14:06
iTunesで選択範囲のアルバムアーティストが空の場合、アーティストをアルバムアーティストとして設定する(OSX 10.9用)
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use 5.10.0;
binmode(STDOUT,':utf8');
# --------------------------------------------------------------
# iTunesで選択範囲のアルバムアーティストが空の場合
# アーティストをアルバムアーティストとして設定する
@mamemomonga
mamemomonga / supervisord
Last active July 9, 2021 18:02 — forked from keimlink/gist:831633
/etc/rc.d/init.d/supervisord for CentOS 6
#!/bin/bash
#
# Startup script for the Supervisor server
#
# Tested with CentOS release 6.6
#
# chkconfig: 2345 85 15
# description: Supervisor is a client/server system that allows its users to \
# monitor and control a number of processes on UNIX-like \
# operating systems.
@mamemomonga
mamemomonga / gist:c3df0c021116b367d478
Created November 25, 2014 01:10
ルートディレクトリにある各種ディレクトリごとの容量を調べる
find / -maxdepth 1 -type d -exec du -sh {} \;
@mamemomonga
mamemomonga / ssh_proxy_command.sh
Last active August 29, 2015 14:12
GitでProxyCommandを使う
#!/bin/sh
exec ssh -o 'ProxyCommand=ssh PFUSER@PFHOST -W %h:%p 2> /dev/null' "$@"