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
/* | |
* ハフマン符号化アルゴリズムの実装. | |
* | |
* Author: hidetake | |
* Time-stamp: <03/05/22 20:17:31 hidetake> | |
*/ | |
#include <stdio.h> | |
#include <malloc.h> | |
//#define SHOW_TRACE |
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
// requires classpath 'org.codehaus.groovy.modules.http-builder:http-builder:0.6' | |
/** | |
* Wait until the resource is ready state. | |
*/ | |
def waitUntilResourceIsReady(String resource) { | |
def http = new groovyx.net.http.HTTPBuilder(resource) | |
def check = { | |
try { | |
http.get(contentType: groovyx.net.http.ContentType.TEXT) |
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
Listen *:9090 | |
<VirtualHost *:9090> | |
ProxyRequests on | |
AddDefaultCharset off | |
AllowCONNECT 443 | |
<Proxy *> | |
Order deny,allow | |
Deny from all | |
</Proxy> | |
# allows HTTPS via CONNECT |
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
esxi_host='root@192.168.1.100' | |
esxi_key='/home/jenkins/esxi_key' | |
function exec_on_esxi () { | |
ssh -i "${esxi_key}" "${esxi_host}" "$@" | |
} | |
function esxi_online_backup () { | |
vmid="$1" | |
vmname="$2" |
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
cd /etc/openvpn/pki | |
sudo certtool -c --load-ca-privkey ca.key --load-ca-certificate ca.crt --load-request $NODENAME.csr --outfile $NODENAME.crt | |
Generating a signed certificate... | |
Enter the certificate's serial number in decimal (default: xxxxx): | |
Activation/Expiration time. | |
The certificate will expire in (days): 1851 |
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
topdir="${WORKSPACE}/rpmbuild" | |
rpmdir="${topdir}/RPMS/$(uname -m)" | |
echo "%_topdir ${topdir}" > "${HOME}/.rpmmacros" | |
case "${TARGET}" in | |
*/httpd-*) | |
# patch for httpd-2.4.3 | |
tarball="${TARGET##*/}" | |
module="${tarball%.tar.*}" | |
curl -O "${TARGET}" |
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 | |
export GIT_PROJECT_ROOT=/home/git/repositories | |
export GIT_HTTP_EXPORT_ALL=1 | |
exec /usr/libexec/git-core/git-http-backend |
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 -xe | |
cd /usr/local | |
sudo git clone git://github.com/sstephenson/rbenv.git | |
cd rbenv | |
sudo mkdir shims versions plugins | |
cd plugins | |
sudo git clone git://github.com/sstephenson/ruby-build.git | |
cat <<EOF | sudo tee /etc/profile.d/rbenv.sh | |
export RBENV_ROOT='/usr/local/rbenv' | |
export PATH="\$RBENV_ROOT/bin:\$PATH" |
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
set guifont=MeiryoKe_Gothic:h12:cSHIFTJIS | |
set columns=120 | |
set lines=50 | |
set backupdir=C:\Users\hoge\vim | |
set directory=C:\Users\hoge\vim | |
set textwidth=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
#!/bin/bash | |
export BEGIN_SNAP_ID=$1 | |
export END_SNAP_ID=$2 | |
export REPORT_PREFIX=/tmp/spreport_${BEGIN_SNAP_ID}_${END_SNAP_ID}_pid$$ | |
export ORACLE_AUTH=PERFSTAT/PERFSTAT | |
if [ "${END_SNAP_ID}" -a "${BEGIN_SNAP_ID}" ]; then | |
echo "BEGIN_SNAP_ID=${BEGIN_SNAP_ID}, END_SNAP_ID=${END_SNAP_ID}, REPORT_PREFIX=${REPORT_PREFIX}" | |
else | |
sudo -u oracle sqlplus ${ORACLE_AUTH} <<\EOF |