Step-by-step installtion of cGit on nginx without funky rewrite rules.
This is for
# The Roots theme by default does not check production assets into Git, so | |
# they are not deployed by Capistrano when using the Bedrock stack. The | |
# following will compile and deploy those assets. Copy this to the bottom of | |
# your config/deploy.rb file. | |
# Based on information from this thread: | |
# http://discourse.roots.io/t/capistrano-run-grunt-locally-and-upload-files/2062/7 | |
# and specifically this gist from christhesoul: | |
# https://gist.github.com/christhesoul/3c38053971a7b786eff2 |
FIELDS = ['cmd', 'command', 'start', 'end', 'delta', 'msg', 'stdout', 'stderr'] | |
def human_log(res): | |
if type(res) == type(dict()): | |
for field in FIELDS: | |
if field in res.keys(): | |
if isinstance(res[field], unicode): | |
encoded_field = res[field].encode('utf-8') | |
else: |
- hosts: localhost | |
remote_user: dirn | |
vars: | |
ansible: ~/.ansible | |
dotfiles: "{{ ansible }}/dotfiles" | |
rc_file: ~/.extra | |
pyenv: /Users/{{ ansible_ssh_user }}/.pyenv | |
python_version: 3.4.3 | |
python_versions: [2.6.9, 2.7.9, 3.3.6, 3.4.3, pypy-2.5.0, pypy3-2.4.0] |
# | |
# Vagrantfile for testing | |
# | |
Vagrant::configure("2") do |config| | |
# the Chef version to use | |
config.omnibus.chef_version = "11.4.4" | |
def configure_vbox_provider(config, name, ip, memory = 384) | |
config.vm.provider :virtualbox do |vbox, override| |
# There was a day where I have too many color schemes in iTerm2 and I want to remove them all. | |
# iTerm2 doesn't have "bulk remove" and it was literally painful to delete them one-by-one. | |
# iTerm2 save it's preference in ~/Library/Preferences/com.googlecode.iterm2.plist in a binary format | |
# What you need to do is basically copy that somewhere, convert to xml and remove color schemes in the xml files. | |
$ cd /tmp/ | |
$ cp ~/Library/Preferences/com.googlecode.iterm2.plist . | |
$ plutil -convert xml1 com.googlecode.iterm2.plist | |
$ vi com.googlecode.iterm2.plist |
Install Virtualbox, Vagrant and Ansible.
Create a new directory for your first Vagrant VM. In that directory, create a Vagrantfile
using vagrant init
, and enable the Ansible provisioner by adding the following.
config.vm.provision "ansible" do |ansible|
ansible.playbook = "playbook.yml"
end
Now you can create an Ansible playbook named playbook.yml
file in the same directory as your Vagrantfile
, and vagrant provision
will run it. Here's an easy one to start with that will update NSS and add the EPEL and IUS repositories.
#! /bin/sh | |
# TODO: parse & pass-through sudo options from $@ | |
sudo_options="-E" | |
scls=$X_SCLS | |
#available_scls="`scl --list | tr '\n' ' ' | sed 's/ $//'`" | |
for arg in "$@" | |
do | |
case "$arg" in | |
*\'*) |