Skip to content

Instantly share code, notes, and snippets.

@mohit
mohit / nginx.sls
Last active February 13, 2020 09:21
using salt to install nginx
nginx-ppa:
pkgrepo.managed:
- name: ppa:nginx/stable
- require_in: nginx
nginx:
pkg.latest:
- refresh: True
service.running:
@mohit
mohit / logstash_mongodb.rb
Created August 11, 2013 22:42
Parse MongoDB logs in logstash
filters {
grok {
type => "mongodb"
pattern => [ "%{DATA:mongo_ts} \[%{DATA:mongo_conn}\]? %{DATA:mongo_type} %{GREEDYDATA:mongo_message}" ]
}
mutate {
type => "mongodb"
replace => [ "@message", "%{mongo_message}" ]
}
grok {

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

# Install with:
# bash < <(curl -L https://raw.github.com/gist/2767174)
echo "Installing S3cmd..."
wget -O- -q http://s3tools.org/repo/deb-all/stable/s3tools.key | sudo apt-key add -
sudo wget -O/etc/apt/sources.list.d/s3tools.list http://s3tools.org/repo/deb-all/stable/s3tools.list
sudo apt-get update && sudo apt-get install s3cmd
echo "Done"