This file contains 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/perl | |
use strict; | |
use warnings; | |
use utf8; | |
sub options { | |
die "usage: $0 <user> <password> <host> <database>\n" if scalar(@ARGV) != 4; | |
return { | |
user => $ARGV[0], |
This file contains 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/awk -f | |
BEGIN { | |
} | |
{ | |
if ($11 != "\"-\"") { | |
if (urls[$11] == "") { | |
urls[$11] = 0; | |
} | |
urls[$11] += 1; | |
} |
This file contains 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
escape ^z^z | |
startup_message off | |
autodetach on | |
hardstatus on | |
hardstatus alwayslastline "screen |%c %m/%d | %w" |
This file contains 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/lib/AnyEvent/Groonga.pm b/lib/AnyEvent/Groonga.pm | |
index fcf0a4c..2e2ded1 100644 | |
--- a/lib/AnyEvent/Groonga.pm | |
+++ b/lib/AnyEvent/Groonga.pm | |
@@ -221,7 +221,7 @@ sub _generate_groonga_command { | |
if ( $command eq 'load' && $key eq 'values' ) { | |
$value = $self->_load_filter($value); | |
} | |
- elsif ( $command eq 'select' && $key eq 'query' ) { | |
+ elsif ( $command eq 'select' && ( $key eq 'query' || $key eq 'filter' )) { |
This file contains 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
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'Skype', 'hp-systray', 'scp-dbus-service', 'Dropbox', 'check-git-status', 'SWT']" |
This file contains 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/perl | |
use strict; | |
use warnings; | |
use utf8; | |
print "#-- missing modules list --\n"; | |
while (<DATA>) { | |
eval("use $_;"); | |
if ($@) { | |
print "cpanm $_"; |
This file contains 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/bash | |
########################################################### | |
# | |
# Clone repo: | |
# git clone git://gist.github.com/973208.git attendance | |
# | |
# Edit your .bashrc | |
# export ATND_TOOL=/home/fukata/usr/local/attendance | |
# export PATH=$PATH:$ATND_TOOL |
This file contains 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
autocmd WinEnter,BufEnter * let b:__gitbranchname = system('cd ' . expand('%:p:h') . ' && git symbolic-ref HEAD 2> /dev/null') | |
"文字コード改行コードの取得 | |
function! GetStatusEx() | |
let str = '' | |
let str = str . '[\n:' . &fileformat . ']' | |
if has('multi_byte') && &fileencoding != '' | |
let str = str . '[enc:' . &fileencoding . ']' | |
else | |
let str = str . '[enc:default(cp932)]' |
This file contains 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
--- plugins/pluginManager.js.org 2011-04-22 20:45:09.691124038 +0800 | |
+++ plugins/pluginManager.js 2011-04-22 20:43:23.690968561 +0800 | |
@@ -39,6 +39,7 @@ | |
{ | |
var files=fs.readdirSync('./plugins/core'); | |
var self=this; | |
+ files.sort(); //sort filenames to read. | |
_.each(files,function(file){ | |
if(self.isFile(fs.realpathSync('./plugins/core/'+file))) | |
{ |
This file contains 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
% lua scope.lua | |
1 | |
2 | |
3 |