Skip to content

Instantly share code, notes, and snippets.

@kazuhisya
kazuhisya / gist:778962
Created January 14, 2011 01:01
.bashrc
# Refresh motd
/bin/ls /path/to |/bin/grep motd_update.sh > /dev/zero
if [ $? == 0 ] && [ $SHLVL == 1 ] ;then
/path/to/motd_update.sh
fi
@kazuhisya
kazuhisya / terminal-launcher
Created April 21, 2011 03:05
Resides in the system tray just to start the Gnome-terminal
#!/usr/bin/python
#-*- coding:utf-8 -*-
import pygtk
import gtk
import os
def tray_activate(event):
os.system("gnome-terminal &")
tray = gtk.StatusIcon()
@kazuhisya
kazuhisya / beluga_lancher.py
Created May 25, 2011 14:34
Beluga launcher
#!/usr/bin/python
#-*- coding:utf-8 -*-
import pygtk
import gtk
import os
def tray_activate(event):
os.system("/opt/google/chrome/google-chrome --app=http://belugapods.com/site/mobile")
tray = gtk.StatusIcon()
@kazuhisya
kazuhisya / git-now
Created July 4, 2011 04:23 — forked from toshi-kawanishi/git-now
making convenient git commit
#!/bin/sh
PREFIX="from now"
MESSAGE="[${PREFIX}] `LANG=en date`"
if [ $# -eq 0 ]
then
git add -u
printf "${MESSAGE}\n\n%s" "`git diff --cached`" | git commit -F -
elif [ $1 != "--rebase" ]
@kazuhisya
kazuhisya / Makefile
Created July 5, 2011 09:03
groovy rpm
NAME := groovy
VERSION := $(shell grep Version: $(NAME).spec | cut -d " " -f 2)
rpm:
spectool -g $(NAME).spec
mkdir -p dist/{BUILD,RPMS,SPECS,SOURCES,SRPMS,install}
mv $(NAME)-*.zip dist/SOURCES/
rpmbuild -ba \
--define "_topdir $(PWD)/dist" \
--define "buildroot $(PWD)/dist/install" \
@kazuhisya
kazuhisya / README.md
Created July 19, 2011 02:51
node.js rpm spec
@kazuhisya
kazuhisya / mysql.spec
Created July 20, 2011 10:10
mysql5.5 el6 rpm spec
Name: mysql
Version: 5.5.14
Release: 2%{?dist}
Summary: MySQL client programs and shared libraries
Group: Applications/Databases
URL: http://www.mysql.com
# exceptions allow client libraries to be linked with most open source SW,
# not only GPL code. See README.mysql-license
License: GPLv2 with exceptions
Packager: Kazuhisa Hara <[email protected]>
@kazuhisya
kazuhisya / README.md
Created July 29, 2011 08:43
npm rpm spec
@kazuhisya
kazuhisya / volinfo.md
Created August 16, 2011 07:22
glusterfs error
[2011-08-16 15:51:28.232732] I [dht-common.c:523:dht_revalidate_cbk] 0-vol3-dht: mismatching layouts for /
[2011-08-16 15:51:28.664589] I [dht-layout.c:655:dht_layout_dir_mismatch] 0-vol3-dht: / - disk layout missing
[2011-08-16 15:51:28.664637] I [dht-common.c:523:dht_revalidate_cbk] 0-vol3-dht: mismatching layouts for /
[2011-08-16 15:51:28.665225] I [dht-layout.c:581:dht_layout_normalize] 0-vol3-dht: found anomalies in /. holes=1 overlaps=0
[2011-08-16 15:51:28.665260] I [dht-common.c:361:dht_lookup_root_dir_cbk] 0-vol3-dht: fixing assignment on /
[2011-08-16 15:51:33.624713] I [dht-layout.c:682:dht_layout_dir_mismatch] 0-vol3-dht: subvol: vol3-stripe-0; inode layout - 0 - 0; disk layout - 0 - 2147483646
[2011-08-16 15:51:33.624764] I [dht-common.c:523:dht_revalidate_cbk] 0-vol3-dht: mismatching layouts for /
[2011-08-16 15:52:30.537803] I [dht-layout.c:655:dht_layout_dir_mismatch] 0-vol3-dht: / - disk layout missing
[2011-08-16 15:52:30.537851] I [dht-common.c:523:dht_revalidate_cbk] 0-vol3-dht: mismatchi
@kazuhisya
kazuhisya / sorry-to-Ishikawa-san.sh
Last active February 27, 2019 17:55
石川さんごめんなさいのおまじない。
#!/usr/bin/env bash
echo "I'm sorry Ishikawa-san."
echo "I'm sorry Ishikawa-san."
echo "I'm sorry Ishikawa-san."
sed --follow-symlinks -i 's;SELINUX=enforcing;SELINUX=disabled;g' /etc/sysconfig/selinux
setenforce 0