This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/a.org b/a.org | |
| new file mode 100644 | |
| index 0000000..ad3e428 | |
| --- /dev/null | |
| +++ b/a.org | |
| @@ -0,0 +1,4 @@ | |
| +* 1 | |
| +- 2 | |
| +3 | |
| +- 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'webrick/httpauth/htdigest' | |
| class UtilApp | |
| def call(env) | |
| result = nil | |
| case env['REQUEST_METHOD'] | |
| when 'POST' | |
| begin | |
| params = Rack::Utils.parse_query(env['rack.input'].read) | |
| realm = "SET YOUR REALM HERE" | |
| username = params['username'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff -urN v303/.gitignore v304/.gitignore | |
| --- v303/.gitignore 2011-02-09 08:02:18.576247002 +0900 | |
| +++ v304/.gitignore 2011-02-09 08:07:41.568247001 +0900 | |
| @@ -1,4 +1,4 @@ | |
| .bundle | |
| db/*.sqlite3 | |
| log/*.log | |
| -tmp/**/* | |
| +tmp/ | |
| diff -urN v303/Gemfile v304/Gemfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # -*- coding: utf-8 -*- | |
| require 'net/smtp' | |
| require 'nkf' | |
| require 'time' | |
| input_password = proc do | |
| STDERR.print "type password: " | |
| begin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| s = <<EOF | |
| <script type="text/javascript" src="jquery-1.4.2.js"></script> | |
| <script type="text/javascript" src="linktorurema.js"></script> | |
| EOF | |
| ARGV.each do |fn| | |
| c = open(fn, "rb"){|f|f.read} | |
| c.sub!(/<\/head>/) do | |
| s + $& |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* gcc -o fake_keys fake_keys.c -lXtst */ | |
| /* example usage: | |
| * ./fake_keys "long string you want to input to x11 application" | |
| */ | |
| #include <X11/Xlib.h> | |
| #include <X11/extensions/XTest.h> | |
| #include <X11/keysym.h> | |
| #include <stdio.h> | |
| int |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # munin plugin for usbrh | |
| # see http://znz.s1.xrea.com/t/?date=20100528 | |
| case "$1" in | |
| autoconf) | |
| if [ -r /proc/usbrh/0/status ]; then | |
| echo yes | |
| exit 0 | |
| else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| set -ex | |
| SERVER_NAME=$1 | |
| SRV_DIR="/srv/www/${SERVER_NAME}" | |
| APACHE2_SITE="/srv/www/${SERVER_NAME}/${SERVER_NAME}.conf" | |
| AWSTATS_CONF="${SRV_DIR}/awstats.${SERVER_NAME}.conf" | |
| AWSTATS_DATA="${SRV_DIR}/awstats" | |
| MAIL_DOMAIN=$(hostname -d) | |
| mkdir -v "$SRV_DIR" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| # -*- coding: utf-8 -*- | |
| require 'rubygems' | |
| require 'nokogiri' | |
| require 'logger' | |
| require 'open-uri' | |
| require 'pathname' | |
| require 'set' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;; gravatar.el --- gravatar fetch/store functions | |
| ;; Copyright (C) 2008 Iwata | |
| ;; Author: Iwata <[email protected]> | |
| ;; Keywords: faces, tools, extensions, mail | |
| ;; This file is free software; you can redistribute it and/or modify | |
| ;; it under the terms of the GNU General Public License as published by | |
| ;; the Free Software Foundation; either version 3, or (at your option) |