Skip to content

Instantly share code, notes, and snippets.

View kotashiratsuka's full-sized avatar

Kota Shiratsuka kotashiratsuka

View GitHub Profile
@kotashiratsuka
kotashiratsuka / snapshot.cron
Created August 15, 2013 17:40
XCP 1.6 discotinued.... but XenServer 6.2 remove VMPP (Virtual Machine Protection Poricy) substitute cron script Example Using # crontab -l 0 * * * * ~/snapshot.sh hourly 0 2 * * * ~/snapshot.sh daily 0 2 * * 0 ~/snapshot.sh weekly
#!/bin/bash
mode=${1-none}
HOURLYBACKUP_TAG="hourlybackup"
DAYLYBACKUP_TAG="dailybackup"
WEEKLYBACKUP_TAG="weeklybackup"
HOURLYBACKUP_LIFETIME="24"
DAYLYBACKUP_LIFETIME="30"
@kotashiratsuka
kotashiratsuka / csstidy
Last active December 21, 2015 11:58 — forked from etienned/csstidy
#!/usr/bin/env php
<?php
/**
* CSSTidy - Command Line Interface (CLI)
*
* Command Line Interface that try to mimic as much as possible the C++ CLI
* version of csstidy. It should be a drop in replacment for the C++ CLI that is
* no longuer maintain. New settings like css_level are added.
*
* Copyright 2005, 2006, 2007 Florian Schmitz
@kotashiratsuka
kotashiratsuka / Vagrantfile
Last active December 28, 2015 02:59
Oracle MySQL 5.6.14 (3nodes/1Master/2Slave) Replication for Chef + Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vms = [
{ :name => "master", :ip => "10.10.10.10", :master => true, :readonly => false },
@kotashiratsuka
kotashiratsuka / gitlab.init
Created December 24, 2013 18:08
RHEL based GitLab initscript.
#!/bin/bash
#
# GitLab
# Author : @kotashiratsuka
# App Version : 6.x
# chkconfig: 2345 82 55
# processname: sidekiq
# description: Runs sidekiq Apache + Passenger integration.
@kotashiratsuka
kotashiratsuka / gitlab-ci.init
Created December 24, 2013 18:14
RHEL Based Simple GitLab CI Initscript.
#!/bin/bash
# GITLAB CI
# Author: @kotashiratsuka
# App Version: 4.1.0
### BEGIN INIT INFO
# Provides: gitlab-ci
# Required-Start: $local_fs $remote_fs $network $syslog redis-server
# Required-Stop: $local_fs $remote_fs $network $syslog
@kotashiratsuka
kotashiratsuka / gitlab-ci-runner.init
Created December 24, 2013 18:18
RHEL Based Simple GitLab CI Runner initscript.
#!/bin/sh
### BEGIN INIT INFO
# Provides: gitlab-ci-runner
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: GitLab CI Runner init.d script
# Description: Enables automatic start of runners at boot time in the background.
#!/bin/bash
#
# Mysql Proxy
# Author : @kotashiratsuka
# App Version : 5.6
# chkconfig: 2345 82 55
# processname: mysql-proxy
# description: Runs mysql-proxy
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.ssh.forward_agent = true
@kotashiratsuka
kotashiratsuka / Vagrantfile
Last active August 29, 2015 14:11
ZFS on Linux for Vagrant + VMWare Fusion | Virtualbox
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "insaneworks/centos"
config.vm.provider :vmware_fusion do |vmf, override|
vdiskmanager = '/Applications/VMware\ Fusion.app/Contents/Library/vmware-vdiskmanager'
# 基本形
git lfs init
git lfs track "*.rpm"
git lfs track "*.srpm"
git lfs ls-files
git add -A
git commit -m 'Adding $file lfs style'
# *.xxx のファイルを全てLFSへ移行 ref https://github.com/github/git-lfs/issues/326