Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
FILENAME="table"
FILENAME2="dump.sql"
BACKUP_COMMAND="mysql backup < "
for year in {2014..2015} ; do
for month in {1..12} ; do
if [ $month -lt 10 ] ; then
month="0"$month
#!/bin/bash
FILENAME="table"
FILENAME2="dump.sql"
BACKUP_COMMAND="mysql backup < "
for year in {2014..2015} ; do
for month in {1..12} ; do
if [ $month -lt 10 ] ; then
month="0"$month
else
@isopan
isopan / gist:1b8a51857b9b6896c766
Created May 19, 2015 03:24
Android Studio New Module Command
./gradlew mylibrary:clean mylibrary:assembleDebug mylibrary:makeJar
@isopan
isopan / gist:23be91d6f73614fd20c6
Created May 19, 2015 03:21
Android Studio New Module
task clearJar(type: Delete) {
delete 'build/libs/mylibrary.jar'
}
task makeJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('release/')
include('classes.jar')
rename('classes.jar', 'mylibrary.jar')
}
makeJar.dependsOn(clearJar, build)
<?php $memcache = new Memcache();
$memcache->connect("127.0.0.1",11211);
$memcache->set('key', 'value');
$v = $memcache->get('key');
var_dump($v);
<?php
$redis = new Redis();
$redis->connect("127.0.0.1",6379);
$redis->set('key', 'value');
$v = $redis->get('key');
/////ansibleサーバー、ansibleクライアントで実行
//ユーザーの作成
# groupadd ansible
# useradd ansible -g ansible
/////ansibleサーバーで実行
//パスワードなしキー作成
# su - ansible
$ sudo yum install ansible
$ cd /home/ansible/.ssh/
autodetach on
bell_msg "^G"
defkanji euc
defencoding euc
encoding euc euc
defscrollback 10000
escape ^Jj
startup_message off
vbell off
caption always "%{= wb} %-w%{=bu dr}%n %t%{-}%+w %= %{=b wk} [%l] %{=b wb}%y/%m/%d(%D) %{=b wm}%c"