Skip to content

Instantly share code, notes, and snippets.

# pecl install channel://pecl.php.net/ssh2-0.11.3
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading ssh2-0.11.3.tgz ...
Starting to download ssh2-0.11.3.tgz (23,062 bytes)
........done: 23,062 bytes
5 source files, building
running: phpize
sh: phpize: コマンドが見つかりません
ERROR: `phpize' failed
# fdisk -l
ディスク /dev/sda: ヘッド 255, セクタ 63, シリンダ 4462
ユニット = シリンダ数 of 16065 * 512 バイト
デバイス ブート 始点 終点 ブロック ID システム
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 144 1052257+ 82 Linux スワップ
/dev/sda3 145 4462 34684335 83 Linux
@snickerjp
snickerjp / DTSTART.php
Created June 10, 2012 08:02
Pasonatech EventCalendar exchange iCal
<?php
//日付指定とJSTの時差分追加
$e->setProperty( 'DTSTART'
, $split_matches[0], $split_matches[1], $split_matches[2], $split_matches[3], $split_matches[4], 00, "+090000" ); // 24 dec 2007 19.30
?>
@snickerjp
snickerjp / date.sh
Created July 2, 2012 05:17
leap second
date -s "`LANG=C date`"
select DATA_FLGS,decode(bitand(DATA_FLGS,16),16,'○','×') from DATA where ID='1' ;
DATA_FLGS DE
--------------- --
16644 ×
select DATA_FLGS,decode(bitand(DATA_FLGS,16),16,'○','×') from DATA where ID='2' ;
DATA_FLGS DE
--------------- --
@snickerjp
snickerjp / dot-ssh-config
Created November 10, 2012 15:07
SSH Keep-Alive Packet
ServerAliveInterval 30
ServerAliveCountMax 120
@snickerjp
snickerjp / nagios-ja.spec
Created November 13, 2012 13:17
Nagios 3.4.1 ja
Name: nagios
Version: 3.4.1
Release: 2%{?dist}.ja
Summary: Host/service/network monitoring program
Group: Applications/System
License: GPLv2
URL: http://www.nagios.org/
Source0: http://downloads.sourceforge.net/nagios/%{name}-%{version}.tar.gz
Source1: nagios.logrotate
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CompressedFolder]
@="Compressed (zipped) Folder"
"FriendlyTypeName"=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
32,00,5c,00,7a,00,69,00,70,00,66,00,6c,00,64,00,72,00,2e,00,64,00,6c,00,6c,\
00,2c,00,2d,00,31,00,30,00,31,00,39,00,35,00,00,00
[HKEY_CLASSES_ROOT\CompressedFolder\CLSID]
@snickerjp
snickerjp / cacti_graph_template_postfix_queues_snickerjp.xml
Created February 4, 2013 11:50
Postfix Queues custom xml inspired from Cacti • View topic - Postfix Queues http://forums.cacti.net/viewtopic.php?f=12&t=16480
<cacti>
<hash_000024d9af2b79e2431a936082e0d73d3156cc>
<name>Postfix Queues</name>
<graph>
<t_title></t_title>
<title>|host_description| - Postfix Queues</title>
<t_image_format_id></t_image_format_id>
<image_format_id>1</image_format_id>
<t_height></t_height>
<height>120</height>
aptitude install -y git curl python-dev python-pip redis-server ruby1.9.1-full rubygems1.9.1
aptitude install -y mysql-server libmysqlclient-dev
adduser --system --shell /bin/sh --gecos 'git version control' --group --disabled-password --home /home/git git
adduser --disabled-login --gecos 'gitlab system' gitlab
usermod -a -G git gitlab
su - gitlab
ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
aptitude install gitolite
cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
su - git