Skip to content

Instantly share code, notes, and snippets.

View 7hunderbird's full-sized avatar
👶
Since 1976.

Tyler Bird 7hunderbird

👶
Since 1976.
View GitHub Profile
@7hunderbird
7hunderbird / attributes-default.rb
Last active August 29, 2015 14:04
proto code for actions and filters for a fail2ban recipe
# cookbooks/fail2ban/attributes/default.rb
# This is an attribute file snippet
default[:fail2ban][:dir] = "/etc/fail2ban/"
default[:fail2ban][:action_path] = "cookbooks/fail2ban/files/default/action"
default[:fail2ban][:filters_path] = "cookbooks/fail2ban/files/default/filters"
@7hunderbird
7hunderbird / 104.131.218.153.json
Last active August 29, 2015 14:04
troubleshooting Chapter 4 - Quick Start - 5 Minute Server of Reliably Deploying Rails Applications
{
"run_list": [
],
"automatic": {
"ipaddress": "104.131.218.153"
}
}
gem install gollum
Fetching: charlock_holmes-0.7.3.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing gollum:
ERROR: Failed to build gem native extension.
/Users/deploy/.rbenv/versions/1.9.3-p484/bin/ruby extconf.rb
checking for main() in -licui18n... no
checking for main() in -licui18n... no
@7hunderbird
7hunderbird / Readme.md
Last active August 29, 2015 13:57
quickest setup of a php machine on a vagrant box

Update Ubuntu

You should already be in the vagrant server with vagrant ssh.

sudo su
apt-get update
apt-get upgrade -y 
exit # root
exit # exit vagrant (to reboot)
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the ruby version
# * the branch/status of the current git repository
# * the branch of the current subversion repository
# * the return value of the previous command
#
http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-lemp-on-ubuntu-12.04-lts
mkdir -p ~/code/personal/vagrant-php
cd ~/code/personal/vagrant-php
download vagrant
http://downloads.vagrantup.com/
install vagrant latest version

install php

By default this version of homebrew has both Apache and MySQL support so we only need to add International support option.

brew tap homebrew/dupes
brew tap josegonzalez/homebrew-php
brew update
Removed ~/.pearrc
Installed XQuartz-2.7.4.dmg
brew install php55 
@7hunderbird
7hunderbird / fix iconv will be deprecated, use String#encode instead
Last active December 14, 2015 22:29
Use this to help get rid of the annoying warning when using Ruby 1.9 and you probably have Activesupport.
1. do a `gem env` to get your paths:
RubyGems Environment:
- RUBYGEMS VERSION: 1.8.23
- RUBY VERSION: 1.9.3 (2013-02-22 patchlevel 392) [x86_64-darwin12.2.0]
- INSTALLATION DIRECTORY: /Users/deploy/.rbenv/versions/1.9.3-p392-railsexpress/lib/ruby/gems/1.9.1
- RUBY EXECUTABLE: /Users/deploy/.rbenv/versions/1.9.3-p392-railsexpress/bin/ruby
- EXECUTABLE DIRECTORY: /Users/deploy/.rbenv/versions/1.9.3-p392-railsexpress/bin
- RUBYGEMS PLATFORMS:
- ruby
FIXME:
WARNING: Nokogiri was built against LibXML version 2.7.3, but has dynamically loaded 2.9.0
or
libxml_ruby.bundle: dlsym(0x10fde1900, Init_libxml_ruby): symbol not found
gem uninstall nokogiri libxml-ruby
brew update
brew uninstall libxml2