Skip to content

Instantly share code, notes, and snippets.

View thogg4's full-sized avatar

Tim Hogg thogg4

  • Test Double
  • North Carolina
  • X @thogg4
View GitHub Profile

Keybase proof

I hereby claim:

  • I am thogg4 on github.
  • I am thogg4 (https://keybase.io/thogg4) on keybase.
  • I have a public key ASCWf7hOtlljk-Em8sUyd3axuZ7G9HWovCbXC3XZjsXQUQo

To claim this, I am signing this object:

@thogg4
thogg4 / cloud-config
Last active April 3, 2016 22:22 — forked from ibuildthecloud/yaml
cloud-config for rancher-agent
#cloud-config
ssh_authorized_keys:
- ssh-rsa AAAA...
rancher:
services:
register:
privileged: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
image: rancher/agent:v0.11.0
@thogg4
thogg4 / bootsync.sh
Last active October 8, 2015 15:44
bootsync.sh
#!/bin/sh
grep '\-\-dns' /var/lib/boot2docker/profile || {
echo 'EXTRA_ARGS="$EXTRA_ARGS --dns 192.168.99.100 --dns 8.8.8.8 --dns 8.8.4.4"' | sudo tee -a /var/lib/boot2docker/profile
}
echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" | sudo tee /etc/resolv.conf
name=${PWD##*/}
if docker-machine ls | grep -q "^$name\s" ; then
echo 'machine found'
else
echo 'machine not found. creating...'
docker-machine create --driver virtualbox $name
docker-machine ssh $name "sudo curl -o /var/lib/boot2docker/bootsync.sh https://gist.githubusercontent.com/thogg4/81de781d4a21382d1c11/raw/9b342537b42e1b7c595a9e1e112c2a131322fb51/bootsync.sh"
docker-machine restart $name
fi
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
input {
file {
type => "rails"
path => ["/docker/log/logstash_production.log"]
codec => json {
charset => "UTF-8"
}
}
rabbitmq {
#!/bin/bash
# Install rbenv
# https://github.com/sstephenson/rbenv
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> .bash_profile
echo 'eval "$(rbenv init -)"' >> .bash_profile
#!/usr/bin/env ruby
git_bundles = [
"git://github.com/msanders/snipmate.vim.git",
#"git://github.com/scrooloose/nerdtree.git",
#"git://github.com/tpope/vim-haml.git",
"git://github.com/tpope/vim-markdown.git",
#"git://github.com/tpope/vim-rails.git",
#"git://github.com/tpope/vim-repeat.git",
#"git://github.com/tpope/vim-surround.git",
@thogg4
thogg4 / gist:6001878
Created July 15, 2013 17:42
speed up cursor on mac
defaults write NSGlobalDomain KeyRepeat -int 0