Skip to content

Instantly share code, notes, and snippets.

Ehtesh Choudhury shurane

Block or report user

Report or block shurane

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@shurane
shurane / install.python.sh
Last active Aug 29, 2015 — forked from pithyless/gist:1208841
Python installation instructions
View install.python.sh
#!/usr/bin/env bash
##Install python, assuming you already have homebrew: http://brew.sh/
brew install readline sqlite gdbm
brew install python --universal
python --version ##Python 2.7
##Install PIP
easy_install pip
@shurane
shurane / whatsapp_decrypt.py
Created May 27, 2014
just individual files at Bas Bosschert's decryption of Whatsapp: http://bas.bosschert.nl/steal-whatsapp-database/
View whatsapp_decrypt.py
#!/usr/bin/env python
import sys
from Crypto.Cipher import AES
try:
wafile=sys.argv[1]
except:
print "Usage: %s <msgstore.db.crypt>" % __file__
sys.exit(1)
@shurane
shurane / ls_cannot_access.yml
Last active Aug 29, 2015
stderr: /bin/ls: cannot access >/tmp/ls_output: No such file or directory
View ls_cannot_access.yml
---
- hosts: logstash
sudo: True
user: root
tasks:
- name: update logstash.conf
command: /bin/true
notify: do nothing
handlers:
@shurane
shurane / tim_pearson_apache.conf
Created Jun 20, 2014
apache log with https and virtualhost logging
View tim_pearson_apache.conf
input {
generator {
type => "generated"
message => '127.0.0.1 - - [16/Jun/2014:06:25:16 -0400] "POST /this/is/a/sample/path.php HTTP/1.1" 200 3891 "https://www.example.com/foo/bar/qux/baz.php?f=file&active=1" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0" on www.example.com'
count => 1
}
}
filter {
grok {
@shurane
shurane / casper_thrane_url_split.conf
Last active Aug 29, 2015
multiple logstash.confs
View casper_thrane_url_split.conf
input {
generator {
type => "generated"
message => 'http://www.elasticsearch.org/blog/series-c-financing-sharing-fruit-labors/?example=yes&kv=true&style=elk'
count => 1
}
}
filter {
# If you want to chomp off the http:// URI portion:
View circles.paper.js
var stamps = [];
var trail = [];
var START_COLOR = getRandomColor();
var END_COLOR = getRandomColor();
var TRAIL_LENGTH = 300;
var CIRCLE_SIZE = 50;
// http://stackoverflow.com/a/5365036
function getRandomColor(){
return '#'+(Math.random()*0xFFFFFF<<0).toString(16);
View logstash-elasticsearch.md
logstash elasticsearch
1.4.2 1.1.1
1.4.1 1.1.1
1.4.0 1.0.1
1.3.3 0.90.9
1.3.2 0.90.9
1.3.1 0.90.9
1.1.10 0.20.5
1.1.9 0.20.2
@shurane
shurane / culprit.json
Last active Aug 29, 2015
CURL -XPOST requests to Elasticsearch.
View culprit.json
{ "@fields": { "args": [ "filename", { "title": "that" } ] } }
@shurane
shurane / Vagrantfile
Last active Aug 29, 2015
Basic logstash conf
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "hashicorp/precise64"
config.vm.network :forwarded_port, guest: 9200, host: 9200
config.vm.network :forwarded_port, guest: 9300, host: 9300
config.vm.network :forwarded_port, guest: 9201, host: 9201
@shurane
shurane / app.json
Created Sep 4, 2014
PM2 managing arbitrary binaries. Thanks @ravi and pm2 issue #471!
View app.json
[{
"name" : "redis-server",
"script": "/usr/local/bin/redis-server",
"instances" : 1,
"out_file" : "redis-server.log",
"error_file" : "redis-server.error",
"exec_interpreter" : "none",
"exec_mode" : "fork_mode"
}, {
"name" : "mongod",
You can’t perform that action at this time.