Skip to content

Instantly share code, notes, and snippets.

View deepakdargade's full-sized avatar
🎯
Focusing

Deepak Dargade deepakdargade

🎯
Focusing
View GitHub Profile
@tivnet
tivnet / etc-monit-monitrc.d-redis
Last active May 31, 2022 12:29
Monitoring Redis with Monit : /etc/monit/monitrc.d/redis
check host redis.host with address 127.0.0.1
if failed port 6379 protocol redis then alert
check process redis-server with pidfile "/var/run/redis/redis-server.pid"
start program = "/etc/init.d/redis-server start"
stop program = "/etc/init.d/redis-server stop"
if failed host 127.0.0.1 port 6379 then restart
if 5 restarts within 5 cycles then timeout
@aaronshaf
aaronshaf / es.sh
Created September 3, 2011 03:53
Install ElasticSearch on Ubuntu 11.04
cd ~
sudo apt-get update
sudo apt-get install unzip curl python-software-properties -y
#sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.18.7.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
#!/usr/bin/env ruby
require 'optparse'
require 'ostruct'
options = OpenStruct.new
options.rows = 10
options.columns = 10
OptionParser.new do |opts|
opts.on('-r', '--rows [INTEGER]', 'Number of rows', Integer) do |x|
@chebyte
chebyte / reorderable
Created June 13, 2011 01:01
plugin for reorder item with rails 3 and jquery
# Reorderable
Allows drag-n-drop reordering of ActiveRecord model items when using MySQL and jQuery.
## Installation
Add the following to your Gemfile:
gem 'reorderable', :git => "git://github.com/chebyte/reorderable.git"
@jonhinson
jonhinson / gist:268626
Created January 4, 2010 16:24
Using paperclip with polymorphic associations. You can use http://www.webyfi.com/?p=222 to add some more functionality (adding multiple photo upload fields to a form using javascript).
We couldn’t find that file to show.