Skip to content

Instantly share code, notes, and snippets.

@4-ner
4-ner / new_gist_file
Created May 25, 2013 10:55
sshでの圧縮と解凍
#圧縮
tar zcvf hoge.tar.gz hoge2
(特定のファイルを除外--excludeの後に。正規表現も可能)
tar cvf foo.tar ./bar --exclude *.[c,o]
#解凍
tar zxvf hoge.tar.gz
#mysqlのバックアップ
@hissy
hissy / backlog-deploy.php
Last active April 11, 2023 02:04
Git Webhookを使ったCPIへのデプロイスクリプト
<?php
// CPIユーザーID(契約情報で確認してください)
$user_id = 'abc123defg';
// リポジトリ名(Backlogで確認してください)
$repo_name = 'repository_name';
// Gitレポジトリの位置の指定
$git_dir = '/usr/home/' . $user_id . '/' . $repo_name . '.git';
// 展開先ディレクトリの指定
$work_tree = '/usr/home/' . $user_id . '/html';
// logファイルの指定