Skip to content

Instantly share code, notes, and snippets.

View lesstif's full-sized avatar

KwangSeob Jeong lesstif

View GitHub Profile
@lesstif
lesstif / tomcat-service.sh
Last active July 27, 2021 01:26
RHEL/CentOS tomcat7 init.d service script.
#!/bin/bash
#
# tomcat
#
# chkconfig: 345 96 30
# description: Start up the Tomcat servlet engine.
#
# processname: java
# pidfile: /var/run/tomcat.pid
#
@lesstif
lesstif / tomcat-runas-user.sh
Last active August 29, 2015 14:02
RHEL/CentOS tomcat running script for user
#!/bin/bash
# Source function library.
. /etc/init.d/functions
## tomcat installation directory
PROCESS_NAME=tomcat-caservicename
CATALINA_HOME="/home/lesstif/apache-tomcat-7.0.54/"
@lesstif
lesstif / tomcat setenv.sh
Last active January 23, 2018 05:47
tomcat setenv.sh
#!/bin/sh
MIN_MEMORY="384m"
# In larger webapps, the maximum amount will need to be increased.
MAX_MEMORY="768m"
# Perm Gen size needs to be increased if encountering OutOfMemoryError: PermGen problems.
## support was removed in 8.0
MAX_PERM_SIZE="384m"
@lesstif
lesstif / .vimrc
Last active August 29, 2015 14:05
vimrc
" To use it, copy it to
" for Unix : ~/.vimrc
" Windog : $VIM\_vimrc
if &t_Co > 2
syntax on
endif
set hlsearch
@lesstif
lesstif / gitlab
Created September 23, 2014 14:07
gitlab init.d script for CentOS 6
#!/bin/bash
#
# GitLab
# Contributors : @elvanja, @troyanov, @eiyaya, @foyo23, @nielsbasjes, @relip, @JasonMing, @andronat, @axilleas, @mdirkse
# App Version : 6.x - 7.x
# chkconfig: 2345 82 55
# processname: unicorn
# processname: sidekiq
# description: Runs unicorn and sidekiq for nginx integration.
@lesstif
lesstif / gitlab.conf
Last active August 29, 2015 14:06
/etc/httpd/conf.d/gitlab.conf for CentOS apache httpd
#This configuration has been tested on GitLab 6.0.0 and GitLab 6.0.1
#Note this config assumes unicorn is listening on default port 8080.
#Module dependencies
# mod_rewrite
# mod_ssl
# mod_proxy
# mod_proxy_http
# mod_headers
NameVirtualHost *:443
@lesstif
lesstif / shutdown_graceful.sh
Last active August 26, 2020 08:42
tomcat shutdown gracefully script
#!/bin/sh
killproc() {
local servicename=$1
local user=$2
local signal="TERM"
if [ "$#" = 0 ] ; then
echo $"Usage: killproc {servicename} {user} {signal}"
return 1
@lesstif
lesstif / redmine_unicorn.sh
Last active August 29, 2015 14:06
redmine start/stop/status using unicorn web server
#!/bin/sh
export RAILS_ENV=production
USER=`whoami`
PIDS=""
getpids() {
local procname=$1
if [ "$#" = 0 ] ; then
echo $"Usage: getpids {procname} "
@lesstif
lesstif / pre-commit.sh
Created September 28, 2014 14:43
subversion pre-commit hook for redmine issue tracking system integration
#!/usr/bin/php<?php
# comment 가 10자 미만이면 커밋 거부
$minchars = 10;
$svnlook = 'svnlook';
#--------------------------------------------
$repos = $argv[1];
$txn = $argv[2];
@lesstif
lesstif / curl-get.php
Last active January 19, 2024 11:20
PHP CURL POST example
<?php
$url = 'http://google.com';
if ($argc > 1){
$url = $argv[1];
}
$ch=curl_init();
// user credencial