Skip to content

Instantly share code, notes, and snippets.

View initcron's full-sized avatar

Gourav Shah initcron

View GitHub Profile
BUILD FAILED
/home/ubuntu/SDA/hbase-lib/build.xml:4: The following error occurred while executing this line:
/home/ubuntu/SDA/common.xml:165: Problem: failed to create task or type antlib:org.apache.ivy.ant:settings
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.
No types or tasks have been defined in this namespace yet
@initcron
initcron / xtra_mysqlbackup.sh
Created August 29, 2012 05:23
/root/xtra_mysqlbackup.sh
#!/bin/bash
BACKUP_DIR=/backups
PASS="randompasswordhere"
MYSQL_CONFIG=/etc/mysql/my.cnf
echo "Creating Backup..."
innobackupex --defaults-file=$MYSQL_CONFIG --password=$PASS $BACKUP_DIR/
echo "DONE Creating Backup!"
@initcron
initcron / gist:5781371
Created June 14, 2013 12:16
varnish cache ttl settings
sub vcl_fetch {
set beresp.grace = 300s;
if (beresp.http.Set-Cookie) {
return(deliver);
}
if (req.url ~ "\.css$") {
set beresp.ttl = 120s;
@initcron
initcron / Vagrantfile
Created March 15, 2014 16:19
Vagrantfile for Workstation
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This is a Vagrant configuration file. It can be used to set up and manage
# virtual machines on your local system or in the cloud. See http://downloads.vagrantup.com/
# for downloads and installation instructions, and see http://docs.vagrantup.com/v2/
# for more information and configuring and using Vagrant.
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
@initcron
initcron / Vagrantfile
Created March 15, 2014 17:50
Vagrantfile for Node
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This is a Vagrant configuration file. It can be used to set up and manage
# virtual machines on your local system or in the cloud. See http://downloads.vagrantup.com/
# for downloads and installation instructions, and see http://docs.vagrantup.com/v2/
# for more information and configuring and using Vagrant.
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
@initcron
initcron / Vagrantfile
Created March 17, 2014 07:43
node2 vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@initcron
initcron / etc_network_interfaces
Created March 18, 2014 04:17
networking configurations on ubuntu
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet dhcp
@initcron
initcron / redo_knide_node
Last active August 29, 2015 13:57
How to redo the node
0. Remove client and node from chef server's registry. Run thi from Workstation
{ws}$ knife client delete node1
{ws}$ knife node delete node1
1. Login to node
{node}$ ssh vagrant@192.168.33.11
2. Browse to /etc/chef on node, and delete everything under it
{node}$ rm -rf /etc/chef/*
@initcron
initcron / default.rb
Created March 19, 2014 03:51
apache default.rb on ubuntu
package "apache2" do
action :install
end
service "apache2" do
action [ :enable, :start]
end
cookbook_file "/var/www/index.html" do
source "index.html"
@initcron
initcron / default.rb
Created March 20, 2014 04:56
apache default recipe
#
# Cookbook Name:: apache
# Recipe:: default
#
# Copyright 2014, YOUR_COMPANY_NAME
#
# All rights reserved - Do Not Redistribute
#