Skip to content

Instantly share code, notes, and snippets.

View daicham's full-sized avatar

Daisuke Takeuchi daicham

View GitHub Profile
@daicham
daicham / setpoxy.bat
Created February 9, 2017 09:57
Set proxy config for Win
@echo off
set PROXY_SERVER="proxy.example.com:80"
set PROXY_OVERRIDE="172.30.*"
echo *** Set proxy config ***
echo PROXY_ENABLE
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "ProxyEnable" /t REG_DWORD /d "1" /f
@daicham
daicham / build.gradle
Created August 11, 2016 06:55
A sample bulid.gradle of Spring Boot
buildscript {
ext {
springBootVersion = '1.4.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
@daicham
daicham / .gitlab-ci.yml
Last active November 13, 2024 07:47
A sample of .gitlab-ci.yml for a gradle project
image: java:8-jdk
stages:
- build
- test
- deploy
before_script:
# - echo `pwd` # debug
# - echo "$CI_BUILD_NAME, $CI_BUILD_REF_NAME $CI_BUILD_STAGE" # debug
@daicham
daicham / mkmvndeps.js
Last active December 2, 2015 12:39
A script for searching artifact information from jar file list that created by fciv ( maven.org, bintray)
var http = require('http');
var fs = require('fs');
var js2xmlparser = require('js2xmlparser');
var search_url = 'http://search.maven.org/solrsearch/select?rows=20&wt=json&q=1:';
// コマンドライン引数チェック
if (process.argv.length != 3) {
log("Usage `node mkmvn path/to/jar_list`");
log("jar_list is required fciv output format");
@daicham
daicham / gist:ea629b0404d472cc8bbf
Created November 2, 2015 10:19
A provisioning script for softlayer
# アップデート
yum -y update
# Japanese Locale の設定
yum -y groupinstall "Japanese Support"
sed -i.org -e "s/en_US.UTF-8/ja_JP.UTF-8/g" /etc/sysconfig/i18n
# JST タイムゾーンに変更
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
@daicham
daicham / proxy.conf
Last active August 29, 2015 14:22
Apache2 reverse proxy setting for fixing a Jekins warning
# See also: https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+says+my+reverse+proxy+setup+is+broken
# Tested on Apache2.2.15/CentOS6
# /etc/httpd/conf.d/proxy.conf
ProxyPass /jenkins http://localhost:8080/jenkins nocanon
ProxyPassReverse /jenkins http://localhost:8080/jenkins
ProxyRequests off
AllowEncodedSlashes on
@daicham
daicham / gist:8fcdc6113591ffc819ad
Last active August 29, 2015 14:22
Download kernel source for CentOS 6
@daicham
daicham / gist:768b822b4f57f47a4fee
Last active August 29, 2015 14:22
Install VirtualBox on CentOS 6
@daicham
daicham / gist:dec93e7c8b133a66e98b
Last active August 29, 2015 14:22
[WIP] Installing Gitlab CE Omnibus Package on CentOS 6

Installing Gitlab Omnibus Package on CentOS 6.0

see also: https://about.gitlab.com/downloads/

sudo yum install curl openssh-server postfix cronie -y
sudo service postfix start
sudo chkconfig postfix on
@daicham
daicham / udpclient.js
Created November 26, 2014 00:56
Sample UDP Server and Client on node.js
// UDP Sample Client
// UDP 接続先
var host = "localhost";
var c_port = 41234;
var dgram = require("dgram");
var client = dgram.createSocket("udp4");
// サーバに送信するメッセージ
// var message = new Buffer("hello");