Skip to content

Instantly share code, notes, and snippets.

--- twittering-mode.el.orig 2013-05-06 15:40:54.000000000 +0900
+++ twittering-mode.el 2014-04-11 22:26:00.759759428 +0900
@@ -560,7 +560,7 @@
(defvar twittering-use-master-password nil
"*Wheter to store private information encrypted with a master password.")
(defvar twittering-private-info-file
- (expand-file-name "~/.twittering-mode.gpg")
+ (expand-file-name "~/.twittering-mode.conf")
"*File for storing encrypted private information when
`twittering-use-master-password' is non-nil.")
# /etc/apache2/mods-available/diary.load
# Depends: setenvif diary
LoadModule diary_module /usr/lib/apache2/modules/mod_diary.so
@dseg
dseg / diary.conf
Last active August 29, 2015 14:27
# /etc/apache2/mods-available/diary.conf
# A sample config file of apache mod_diary on Ubuntu 14.04 (trusty)
# mod_diary
# http://github.com/hamano/apache-mod-diary/
<IfModule mod_diary.c>
<Location /blog>
SetHandler diary
DiaryTitle "...The Ballad of Dead Pixels..."
/var/www/blog IN_MODIFY,IN_CREATE,IN_DELETE,IN_MOVE,IN_NO_LOOP /usr/local/bin/update-diary
#!/bin/sh
cd /var/www/blog && \
/usr/local/bin/diary-mkindex > index.hdf
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="ja">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
<?cs if:entry.title ?>
<?cs var:html_escape(entry.title + " - " + diary.title) ?>
<?cs else ?>
<?cs var:html_escape(diary.title) ?>
<?cs /if ?>
--- shunit2 2011-05-01 20:10:33.000000000 +0000
+++ shunit2-color 2015-09-03 11:23:08.854549999 +0000
@@ -829,18 +829,18 @@
&& _shunit_skipped_="skipped=${__shunit_assertsSkipped}"
if [ ${_shunit_ok_} -eq ${SHUNIT_TRUE} ]; then
- _shunit_msg_='OK'
+ _shunit_msg_="\033[32;1mOK\033[0m\n"
[ -n "${_shunit_skipped_}" ] \
&& _shunit_msg_="${_shunit_msg_} (${_shunit_skipped_})"
@dseg
dseg / apache_memory_usage
Created September 4, 2015 08:35
Get apache memory usage
#!/bin/sh
HTTPD=apache
ps aux | grep "$HTTPD" | awk '{mem+=$6} END{ print "Average: " (mem/NR) "MB" }'
# do after installation of gawk 4.1.3 (to /usr/local/bin/gawk)
sudo update-alternatives --install /usr/bin/awk awk /usr/local/bin/gawk 15
#!/bin/bash
/usr/bin/nekotools server -p 2000 -h localhost -d ./