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
// Run following command to build this file. | |
// $ g++ `mecab-config --cflags` `mecab-config --libs` -Os mecab.cpp | |
#include <iostream> | |
#include <mecab.h> | |
int main (int argc, char **argv) { | |
const MeCab::Node* node = MeCab::createTagger("")->parseToNode("隣の客はよく柿食う客だ。"); | |
for (; node; node = node->next) { | |
switch(node->stat) { |
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/env ruby | |
require 'natto' | |
require 'pp' | |
nm = Natto::MeCab.new | |
morph = [] | |
while line = $stdin.gets | |
nm.parse(line) {|n| | |
next unless n.is_nor? || n.is_unk? |
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/env ruby -E BINARY | |
# The original script was published in zsh thread@2ch.net and is licensed under the public domain. | |
history = [] | |
l = nil | |
while l = gets | |
while /\\\Z/ === l | |
l << gets |
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/env bash | |
sleep 12 && conky |
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/env bash | |
gsettings set org.gnome.desktop.interface font-name 'MigMix 2P 10' | |
gsettings set org.gnome.desktop.interface document-font-name 'MigMix 2P 10' | |
gsettings set org.gnome.desktop.interface monospace-font-name 'MigMix 2M 10' | |
gconftool-2 --type string --set /apps/metacity/general/titlebar_font "MigMix 2P Bold 10" |
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
[Function] | |
Command=/H | |
Title=Debugger | |
Type=SystemCommand |
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
' ___ _ ___ ___ _ _ ___ | |
' / __| /_\ | _ \ / __| | | |_ _| | |
' \__ \/ _ \| _/ | (_ | |_| || | | |
' |___/_/ \_\_| \___|\___/|___| | |
' Automation | |
Option Explicit | |
Dim SapGui, Application, Connection |
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/env ruby | |
fqdn = [] | |
while STDIN.gets | |
fqdn << $_.strip | |
end | |
def s(l) | |
return l.split('.').reverse.join('.') | |
end |
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/env ruby | |
# Google Public DNS | |
#DNS = %w( 8.8.8.8 8.8.4.4 ) | |
# (Recommended) Google Public DNS, Dnsadvantage, OpenDNS, NortonDNS, Level 3 | |
DNS = %w( 8.8.8.8 8.8.4.4 156.154.70.1 156.154.71.1 208.67.222.222 208.67.220.220 198.153.192.1 198.153.194.1 4.2.2.1 4.2.2.2 4.2.2.3 4.2.2.4 4.2.2.5 4.2.2.6 ) | |
WAITMAX = 5000 # ms |
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/env ruby | |
require 'socket' | |
require 'timeout' | |
require 'thread' | |
$stdout.sync = true | |
DEBUG = false # Debug mode |
OlderNewer