Skip to content

Instantly share code, notes, and snippets.

@kou1okada
kou1okada / deployJava.txt
Last active October 3, 2015 00:48
http://java.com/js/deployJava.txt - 2011-11-22 15:23:19.000000000 +0900
/*
* Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
@kou1okada
kou1okada / deployJava.js
Last active September 16, 2019 04:58
http://java.com/js/deployJava.js - 2011-11-22 15:23:18.000000000 +0900
var deployJava=function(){var hattrs={core:['id','class','title','style'],i18n:['lang','dir'],events:['onclick','ondblclick','onmousedown','onmouseup','onmouseover','onmousemove','onmouseout','onkeypress','onkeydown','onkeyup'],applet:['codebase','code','name','archive','object','width','height','alt','align','hspace','vspace'],object:['classid','codebase','codetype','data','type','archive','declare','standby','height','width','usemap','name','tabindex','align','border','hspace','vspace']};var object_valid_attrs=hattrs.object.concat(hattrs.core,hattrs.i18n,hattrs.events);var applet_valid_attrs=hattrs.applet.concat(hattrs.core);function arHas(ar,attr){var len=ar.length;for(var i=0;i<len;i++){if(ar[i]===attr)return true;}
return false;}
function isValidAppletAttr(attr){return arHas(applet_valid_attrs,attr.toLowerCase());}
function isValidObjectAttr(attr){return arHas(object_valid_attrs,attr.toLowerCase());}
var rv={debug:null,firefoxJavaVersion:null,myInterval:null,preInstallJREList:null,returnPage:null,brand:n
@kou1okada
kou1okada / cygwin64_rbenv_install_ruby-2.1.5.sh
Last active October 12, 2015 02:27
Patch for compiling ruby on some platforms.
#!/usr/bin/env bash
TARGET_URL=http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.5.tar.gz
PATCH_URL=https://gist.github.com/kou1okada/3956838/raw/ruby-2.1.5.cygwin64.patch
HASH="$(cat <<EOD
df4c1b23f624a50513c7a78cb51a13dc *ruby-2.1.5.tar.gz
feba105b7393c36df66eb34daf937974 *ruby-2.1.5.cygwin64.patch
EOD
)"
TARGET_ARCHIVE="${TARGET_URL##*/}"
@kou1okada
kou1okada / build_open_jtalk_for_cygwin.sh
Last active October 12, 2015 12:48
Build Open JTalk package for cygwin
#!/usr/bin/env bash
#-----------------------------------------------------------------------------
PKGNAME=open-jtalk
VERSION=1.06
SRCURL=http://downloads.sourceforge.net/open-jtalk/open_jtalk-${VERSION}.tar.gz
SRCARC=${SRCURL##*/}
SRCDIR=${SRCARC%.tar.gz}
CONFIGUREOPT="--with-hts-engine-header-path=/usr/include --with-hts-engine-library-path=/usr/lib --with-charset=UTF-8"
REQUIRES=( /usr/include/HTS_engine.h )
HINT="\
@kou1okada
kou1okada / build_htsengine_for_cygwin.sh
Last active October 12, 2015 14:07
Build htsengine package for cygwin
#!/usr/bin/env bash
#-----------------------------------------------------------------------------
PKGNAME=htsengine
VERSION=1.07
SRCURL=http://downloads.sourceforge.net/hts-engine/hts_engine_API-${VERSION}.tar.gz
SRCARC=${SRCURL##*/}
SRCDIR=${SRCARC%.tar.gz}
CONFIGUREOPT=""
REQUIRES=( )
HINT="\
@kou1okada
kou1okada / build_hts_voice_nitech_jp_atr503_m001_for_cygwin.sh
Last active October 12, 2015 14:07
build hts-voice-nitech-jp-atr503-m001 package for cygwin
#!/usr/bin/env bash
#-----------------------------------------------------------------------------
PKGNAME=hts-voice-nitech-jp-atr503-m001
VERSION=1.05
SRCURL=http://downloads.sourceforge.net/open-jtalk/hts_voice_nitech_jp_atr503_m001-${VERSION}.tar.gz
SRCARC=${SRCURL##*/}
SRCDIR=${SRCARC%.tar.gz}
CONFIGUREOPT=""
REQUIRES=( )
HINT="\
@kou1okada
kou1okada / build_hts_voice_mmdagent_example_mei_for_cygwin.sh
Last active October 12, 2015 14:07
build hts-voice-mmdagent-example-mei package for cygwin
#!/usr/bin/env bash
#-----------------------------------------------------------------------------
PKGNAME=hts-voice-mmdagent-example-mei
VERSION=1.3
SRCURL=http://downloads.sourceforge.net/mmdagent/MMDAgent_Example-1.3.zip
SRCARC=MMDAgent_Example-1.3.zip
SRCDIR=MMDAgent_Example-1.3
CONFIGUREOPT=""
REQUIRES=( )
HINT="\
@kou1okada
kou1okada / cygdep.rb
Last active October 13, 2015 21:19
cygwin package dependency checker
#!/usr/bin/env ruby
#-----------------------------------------------------------------------------
# cygdep.rb - cygwin package dependency checker.
# Copyright (c) 2012 Koichi OKADA. All rights reserved.
#
# License:
# MIT license.
#-----------------------------------------------------------------------------
require 'optparse'
@kou1okada
kou1okada / wol.rb
Last active December 11, 2015 00:09
Ruby script to send WOL magic packet.
#!/usr/bin/env ruby
# Copyright (c) 2013 Koichi OKADA. All rights reserved.
# This script is distributed under the MIT license.
# http://www.opensource.org/licenses/mit-license.php
require 'socket'
require 'optparse'
def wol mac, ip = "255.255.255.255", port = 9, verbose = true
magic = ["ff" * 6 + mac.gsub(/[:-]/,"") * 16].pack("H*")
@kou1okada
kou1okada / Makefile
Last active May 6, 2019 02:11
Unix crypt test
TARGETS = unixcrypttest
LDLIBS = -lcrypt
all: $(TARGETS)
clean:
-$(RM) $(TARGETS)