Skip to content

Instantly share code, notes, and snippets.

View initcron's full-sized avatar

Gourav Shah initcron

View GitHub Profile
@initcron
initcron / git_daemon_spec.rb
Created April 9, 2014 05:23
serverspec tests for git daemon
require 'serverspec'
include Serverspec::Helper::Exec
include Serverspec::Helper::DetectOS
RSpec.configure do |c|
c.before :all do
c.path = '/sbin:/usr/sbin'
end
end
@initcron
initcron / server.rb
Created April 9, 2014 05:30
git-cookbook server.rb recipe
include_recipe "git"
include_recipe "runit"
package "git-daemon-run"
runit_service "git-daemon" do
sv_templates false
end
@initcron
initcron / gist:10834380
Last active August 29, 2015 13:59
Puppet Learning Environment Setup for Redhat
vagrant box add puppet puppet-centos-offline.box
cd learn
mkdir box1
cd box1
vagrant box list
vagrant init puppet
vagrant up
vagrant ssh
# Edit /etc/sysconfig/network
@initcron
initcron / gist:11024897
Created April 18, 2014 04:32
Puppet 003 Modules, Ordering and Trifects
rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm
#This script install and configures chef solo with initcron repository. This does the following,
# 1. Install Chef Solo/Chef Client
# 2. Install git
# 3. Create directory structure required by chef solo
# 5. Copies over chefcookbooks, roles, databags to appropriate location
#
#What to do after running this script?
# 1. Go to /etc/chef e.g. cd /etc/chef
# 2. Edit node.json, and configure runlist
# 3. Run "sudo chef-solo"
deploy@ip-10-0-0-130:/var/www/projects/projectx/current$ rails rake thinking_sphinx:index
create
create app/controllers
create app/helpers
create app/models
create app/views/layouts
create config/environments
create config/initializers
create config/locales
create db
root@ip-10-0-0-130:/home/ubuntu/Rails_App/projectx/config# less development.sphinx.conf
indexer
{
}
searchd
{
listen = 127.0.0.1:9312
log = C:/Users/CEO/My Documents/Aptana Studio Workspace/ProjectX/log/searchd.log
query_log = C:/Users/CEO/My Documents/Aptana Studio Workspace/ProjectX/log/searchd.query.log
indexer
{
}
searchd
{
listen = localhost:9312
listen = localhost:9306:mysql41
log = /var/www/projects/projectx/releases/92f8fef9a72f0a3d2f1f669c9c94b3c983dd2e53/log/searchd.log
query_log = /var/www/projects/projectx/releases/92f8fef9a72f0a3d2f1f669c9c94b3c983dd2e53/log/searchd.query.log
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
@initcron
initcron / bashrc
Created May 28, 2014 06:24
bashrc
#
# Custom bashrc config, generated by puppet
#
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi