Skip to content

Instantly share code, notes, and snippets.

View chusiang's full-sized avatar
🐧
Improving the world via Ansible and DevOps.

Chu-Siang Lai chusiang

🐧
Improving the world via Ansible and DevOps.
View GitHub Profile
@chusiang
chusiang / virtualenv-auto-activate.sh
Created November 27, 2015 05:15 — forked from Willyfrog/virtualenv-auto-activate.sh
virtualenv-auto-activate-auto-deactivate
#!/bin/bash
# virtualenv-auto-activate.sh
#
# Installation:
# Add this line to your .bashrc or .bash-profile:
#
# source /path/to/virtualenv-auto-activate.sh
#
# Go to your project folder, run "virtualenv .venv", so your project folder
# has a .venv folder at the top level, next to your version control directory.
@chusiang
chusiang / laravel.logrotate
Last active December 23, 2015 09:55 — forked from Repox/laravel
Laravel logrotate configuration (1 daily rotation, 7 days retention) on Ubuntu 14.04
/home/USERNAME/workspace/laravel/storage/logs/laravel.log {
daily
missingok
rotate 7
maxage 7
compress
notifempty
create 644 www-data www-data
su www-data www-data
}
@chusiang
chusiang / com.docker.docker-machine.plist
Last active March 18, 2016 08:32 — forked from johnantoni/com.docker.boot2docker.plist
run docker-machine on system startup - Mac OSX - El Capitan
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.docker.docker-machine</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/docker-machine</string>
<string>start</string>
#! /usr/bin/python
#
# Query and display EC2 metadata related to the AMI instance
# Copyright (c) 2009 Canonical Ltd. (Canonical Contributor Agreement 2.5)
#
# Author: Alon Swartz <alon@turnkeylinux.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or

AWSome Day | 2016 台灣高雄

AWS 雲端日 將在以下城市與大家見面:

  • 城市: 高雄
  • 日期: 2016 年 03 月 15 日(星期二)
  • 時間: 09:30 - 17:00 (8:30 - 0930 報到)
@chusiang
chusiang / automate_with_ansible_basic_outline.md
Last active May 28, 2016 22:06
現代 IT 人一定要知道的 Ansible 自動化組態技巧 (簡報大綱)

現代 IT 人一定要知道的 Ansible 自動化組態技巧 (簡報大綱)

  1. 現代 IT 人一定要知道的 Ansible 自動化組態技巧

  2. 關於凍仁翔

  • 4 年以上 IT 經驗。
  • 現職 DrSays IT 工程師。
  • Ansible 實戰講堂 4e. 學員。
  • 於 Ansible Galaxy 分享 Roles:
  • php7 (php-fpm)
# -*- mode: ruby -*-
# vi: set ft=ruby :
=begin
The Vagrantfile template is fork from https://gist.github.com/joepurdy/28b894574cee15344918.
# Ansible (Windows) VMs
config.vm.box = "chusiang/win10-x64-ansible"
# System Account Credentials
@chusiang
chusiang / ansible_on_demand_webinar.md
Last active June 22, 2016 07:29
Ansible On Demand Webinar | Ansible Inc.
@chusiang
chusiang / clone-qiniu-bucket.sh
Last active November 1, 2016 03:32
Clone all files from bucket1 to bucket2.
#!/bin/bash
# ============================================================
# Author: Chu-Siang Lai / chusiang (at) drx.tw
# Blog: http://note.drx.tw
# Filename: clone-qiniu-bucket.sh
# Modified: 2016-11-01 11:06
# Description: Clone all files from bucket1 to bucket2.
#
# $ chmod +x clone-qiniu-bucket.sh
# $ ./clone-qiniu-bucket.sh bucket_source bucket_new