Skip to content

Instantly share code, notes, and snippets.

@snickerjp
snickerjp / nginx.repo
Created November 26, 2013 01:32
Add mainline,src repository [Official Page: http://nginx.org/en/linux_packages.html]
# for CentOS 6
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/6/$basearch/
gpgcheck=0
enabled=0
[nginx-src]
name=nginx SRPM repo
baseurl=http://nginx.org/packages/centos/6/SRPMS/
@snickerjp
snickerjp / nagios-3.5.0-ja.patch
Created August 13, 2013 11:26
Nagios 3.5.0 RPM spec-file for Japanese Nagiosにももーいさんの日本語パッチをあてて、ビルドするためのspecファイル差分です!
--- nagios.spec 2013-04-25 10:03:11.000000000 +0900
+++ nagios-ja.spec 2013-08-13 18:32:37.130742566 +0900
@@ -1,6 +1,6 @@
Name: nagios
Version: 3.5.0
-Release: 1%{?dist}
+Release: 1%{?dist}.ja
Summary: Host/service/network monitoring program
Group: Applications/System
@snickerjp
snickerjp / Twitter-Card-for-Blogger.html
Created July 30, 2013 15:27
Twitter Card for Blogger.com (blogspot)
<!-- twitter card details -->
<b:if cond='data:blog.pageType == &quot;item&quot;'>
<b:if cond='data:blog.postImageThumbnailUrl'>
<b:if cond='data:blog.metaDescription'>
<meta content='summary' name='twitter:card'/>
<meta content='@snicker_jp' name='twitter:site'/>
<meta content='@snicker_jp' name='twitter:creator'/>
<meta expr:content='data:blog.pageName' name='twitter:title'/>
<meta expr:content='data:blog.metaDescription' name='twitter:description'/>
<meta expr:content='data:blog.postImageThumbnailUrl' name='twitter:image:src'/>
@snickerjp
snickerjp / azure-log-del.sh
Created May 12, 2013 10:05
Azure VM Deprovisioning 中身を確認して使ってください。
#!/usr/bin/env bash
# ログ削除
\rm /var/log/*-2013*
for i in /var/log/*log; do cat /dev/null > $i ;done
for i in /var/log/httpd/*; do cat /dev/null > $i ;done
for i in /var/log/audit/*; do cat /dev/null > $i ;done
cat /dev/null > /var/log/secure
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
@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>
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 / 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
@snickerjp
snickerjp / dot-ssh-config
Created November 10, 2012 15:07
SSH Keep-Alive Packet
ServerAliveInterval 30
ServerAliveCountMax 120
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
--------------- --