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
# misc | |
export LANG=ja_JP.UTF-8 | |
alias ls='ls -Gl ' | |
export PATH=/opt/local/bin:/opt/local/sbin/:$PATH | |
export MANPATH=/opt/local/man:$MANPATH | |
autoload -U compinit | |
compinit |
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
var KIND_IPOD = 2; | |
var iTunesApp = WScript.CreateObject("iTunes.Application"); | |
var sources = iTunesApp.Sources; | |
for(i=1; i <= sources.Count; i++){ | |
item = sources.Item(i); | |
if (item.Kind == KIND_IPOD) { | |
item.UpdateIPod(); | |
} | |
} |
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/local/bin/ruby | |
# -*- encoding: utf-8 -*- | |
require "csv" | |
require "net/http" | |
require 'sqlite3' | |
db=SQLite3::Database.new("/tmp/subtitle.db") | |
sql = <<SQL |
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/sh | |
targetdir=/tank/recorded/ | |
targetfilesystem=tank | |
usage=`df | grep ^$targetfilesystem | awk '{print $5}' | sed 's/%//g'` | |
while [ $usage -gt 21 ] | |
do | |
rm -f "$targetdir`ls -t $targetdir | tail -n1`" |
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
db.release.find().forEach(function(doc){ doc.date = new Date(doc.date);db.release.save(doc); }) |
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/sh | |
chinachu_home="/home/chinachu/chinachu/" | |
tuners="BSCS-1 BSCS-2 GR-1 GR-2" | |
tunercount=`echo ${tuners} | wc -w` | |
i=0 | |
if [ $1 = "config" ] | |
then | |
cat <<'EOM' | |
graph_title Tuner lock |
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 windows_productkey(){ | |
WshShell = new ActiveXObject( "WScript.Shell" ); | |
ret = WshShell.RegRead('HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\DigitalProductId'); | |
DigitalProductId = ret.toArray(); | |
hexPid = DigitalProductId.slice( 52, 67 ); | |
decodedChars = Array(24); | |
digits = Array("B","C","D","F","G","H","J","K","M","P","Q","R","T","V","W","X","Y","2","3","4","6","7","8","9"); | |
for ( var i=1; i<30;i++ ){ | |
if((i % 6) == 0 ){ | |
decodedChars.push("-"); |
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
#usage | |
# find %Dropbox%/Apps/Wahoo | grep csv$ | sort | awk -f wahoo2csv.awk | |
# Date, TotalDistance, Time, AverageSpeed | |
BEGIN { | |
FS="," | |
general_info_flg=0 | |
distance=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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My workout stat</title> | |
<script src="//code.jquery.com/jquery-1.8.2.js"></script> | |
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> | |
<script type='text/javascript' src='//www.google.com/jsapi'></script> |
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
#!c:/bin/ruby/bin/ruby | |
# -*- encoding: cp932 -*- | |
# file: tsv2sqlite3.rb | |
require 'optparse' | |
require 'rubygems' | |
require 'sqlite3' | |
opt = OptionParser.new |
OlderNewer