Skip to content

Instantly share code, notes, and snippets.

Hidetake Iwata int128

Block or report user

Report or block int128

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@int128
int128 / DailyRotateController.java
Created Jun 22, 2011
Picasa Album Arrangement Service
View DailyRotateController.java
package org.hidetake.lab.controller.admin.motionPicasa;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Logger;
import org.hidetake.lab.motionPicasa.PhotoArrangementService;
import org.hidetake.lab.motionPicasa.PicasaService;
import org.hidetake.lab.motionPicasa.PicasaServiceLocator;
import org.hidetake.lab.motionPicasa.ScheduleUtil;
@int128
int128 / EvaluateJavaScriptController.java
Created Dec 12, 2011
On the fly JavaScript evaluator
View EvaluateJavaScriptController.java
package org.hidetake.lab.controller.admin;
import java.io.PrintWriter;
import java.io.StringWriter;
import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;
import org.slim3.controller.validator.Validators;
View template.html
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8" />
<title>example</title>
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<![endif]-->
<!--[if lt IE 9]>
<script>
@int128
int128 / gist:2360407
Created Apr 11, 2012
GitLab init script for Gentoo Linux
View gist:2360407
#!/sbin/runscript
# GitLab init script for Gentoo Linux
# see https://github.com/gitlabhq/gitlabhq/blob/master/doc/installation.md
GITLAB_BASE=/home/gitlab/gitlab
GITLAB_USER=gitlab
depend() {
need net mysql redis
}
@int128
int128 / setproxy.sh
Created Jun 5, 2012
http_proxy を対話的に設定する関数
View setproxy.sh
# /etc/profile.d/setproxy.sh
function setproxy () {
proxy_uri='proxy.example.com:8080'
echo "Proxy URI: ${proxy_uri}"
echo -n 'Proxy user: '
read -s proxy_id
echo
echo -n 'Proxy password: '
read -s proxy_pw
echo
@int128
int128 / zabbix_status.php
Created Jul 23, 2012
Generate an image to show environment status
View zabbix_status.php
<?php
define('ZABBIX_AUTHKEY', '****');
define('FONT_PATH', '/usr/share/fonts/vlgothic/VL-PGothic-Regular.ttf');
//define('FONT_PATH', '/usr/share/fonts/dejavu/DejaVuSans.ttf');
define('FONT_SIZE', 24);
define('IMAGE_WIDTH', 300);
define('IMAGE_HEIGHT', 50);
function zabbix_query ($request) {
$channel = curl_init();
View Build.scala
import sbt._
import Keys._
import com.github.siasia.WarPlugin.warSettings
object ProjectBuild extends Build {
lazy val root = Project(
id = "root",
base = new File("."),
settings = Project.defaultSettings ++ warSettings ++ mySettings ++ Seq(
externalIvySettings(),
@int128
int128 / install-service.bat
Created Oct 4, 2012
installing Jetty as a Windows service
View install-service.bat
rem see http://commons.apache.org/daemon/procrun.html
set SERVICE_HOME=c:\hoge
%SERVICE_HOME%\service.exe //IS//Jenkins --DisplayName=Jenkins --StartPath=%SERVICE_HOME% --LogPath=%SERVICE_HOME%\logs --LogLevel=Debug --StdOutput=auto --StdError=auto --StartMode=Java --StopMode=Java --Jvm=auto ++JvmOptions=-jar ++JvmOptions=start.jar
@int128
int128 / rsyslog.remote.conf
Created Nov 19, 2012
syslog reception config for rsyslog
View rsyslog.remote.conf
#rsyslog v3 config file
# Provides UDP syslog reception
$ModLoad imudp.so
$UDPServerRun 514
$AllowedSender UDP, 127.0.0.1, 192.168.0.0/24
# Provides TCP syslog reception
#$ModLoad imtcp.so
#$InputTCPServerRun 514
@int128
int128 / httpd.conf
Created Nov 20, 2012
Web proxy configuration
View httpd.conf
Listen *:9090
<VirtualHost *:9090>
ProxyRequests on
ProxyRemote * http://192.168.0.100:9090
AddDefaultCharset off
<Proxy *>
Order deny,allow
Deny from all
Allow from 127.0.0.0/8
Allow from 192.168.1.0/24
You can’t perform that action at this time.