Skip to content

Instantly share code, notes, and snippets.

@zunda
zunda / mikutter.desktop
Created June 16, 2012 07:50
Ubuntu 12.04のUnityのランチャーに追加できるようにこのファイルを~/.local/share/applications/mikutter.desktopに作りログインしなおす
[Desktop Entry]
Name=mikutter
Exec=ruby1.9.1 /home/zunda/local/src/mikutter/mikutter.rb
Terminal=false
Type=Application
Icon=/home/zunda/local/src/mikutter/core/skin/data/icon.png
@zunda
zunda / check-strptime.c
Created August 10, 2012 05:16
strptime(3)の動作を確かめてみる
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#define __USE_XOPEN
#include <time.h>
int
main(int argc, char **argv)
{
@zunda
zunda / check-timegm.c
Created August 11, 2012 10:44
timegm(3)の動作を確かめてみる
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
int
main(int argc, char **argv)
{
struct tm tm;
@zunda
zunda / 1
Created August 24, 2012 04:30
PS/2マウスがおかしくなった時(2)と活線挿抜した時(1)の/var/log/messages
kernel: psmouse.c: bad data from KBC - timeout
kernel: input: PS2++ Logitech Wheel Mouse as /devices/platform/i8042/serio1/input/input8
@zunda
zunda / show-encoding-mp3tag.rb
Created October 3, 2012 05:06
shows encodings of MP3 tags
#!/usr/bin/ruby1.9
# usage: ruby1.9.x show-encoding-mp3tag.rb *.mp3
# shows encodings of MP3 tags
#
# Copyright 2012 (C) zunda <zunda at freeshell.org>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#
@zunda
zunda / convert-encoding-mp3tag.rb
Created October 3, 2012 05:17
converts encoding of MP3 tags into UTF-8
#!/usr/bin/ruby1.8
# usage: ruby1.8.x convert-encoding-mp3tag.rb *.mp3
# converts encoding of MP3 tags into UTF-8
#
# This file should be encoded in UTF-8.
#
# Copyright 2012 (C) zunda <zunda at freeshell.org>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
@zunda
zunda / show-encoding-mp3tag.rb
Created October 5, 2012 05:45
shows encodings of MP3 tags, mp3info ver
#!/usr/bin/ruby
# usage: ruby show-mp3-tags.rb *.mp3
# shows encodings of MP3 tags
#
# Copyright 2012 (C) zunda <zunda at freeshell.org>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#
@zunda
zunda / 49_forget-ssh-identity-hibernate
Created November 1, 2012 06:34
A script to be saved in /etc/pm/sleep.d let ssh-agent forget identities before hibernation. Do not forget to chmod +x
#!/bin/sh
#
# Action script to forget identities from ssh-agent
# before a hibernate
#
# Copyright: 2012 zunda <zunda at freeshell.org>
# License: GPL-2 or later
#
# pm-action(8) - <action> <suspend method>
#
@zunda
zunda / pick_up_licenses
Created November 14, 2012 05:03
むかあしMomonga時代に作った、ソースコードからライセンス文を検出するスクリプト
#!/usr/bin/ruby -Ku
# -*- coding: utf-8 -*-
# $Id: pick_up_licenses,v 1.15 2003/11/26 16:25:05 zunda Exp $
#
# picks up signatures for licenses from source trees
#
# Copyright 2003 Momonga Project <admin at momonga-linux.org>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
@zunda
zunda / gist:4133483
Created November 23, 2012 00:45
It's All Textから端末内でvimを起動するためのスクリプト
#!/bin/sh
/usr/bin/gnome-terminal --working-directory=$HOME -e "/usr/bin/vim -c 'set enc=utf8 fenc=utf8 et tw=0 ts=2 sw=2' $@"