Skip to content

Instantly share code, notes, and snippets.

View nellaivijay's full-sized avatar
🎯
Focusing

Vijayakumar Ramdoss nellaivijay

🎯
Focusing
View GitHub Profile
@nickman
nickman / HeliosMBeanServerBuilder.java
Created April 12, 2012 12:14
An example of an MBeanServer interceptor
package org.helios.jmx;
import java.io.ObjectInputStream;
import java.lang.management.ManagementFactory;
import java.util.Set;
import javax.management.Attribute;
import javax.management.AttributeList;
import javax.management.AttributeNotFoundException;
import javax.management.InstanceAlreadyExistsException;
@kuleszaj
kuleszaj / safe-rm.sh
Created April 29, 2012 01:43
Safe Remove
#!/bin/bash
sleep 2
args=( $@ )
preserve_paths=( / /bin /boot /dev /etc /home /initrd /lib /proc /root /sbin /sys /usr /usr/bin /usr/include /usr/lib /usr/local /usr/local/bin /usr/local/include /usr/local/sbin /usr/local/share /usr/sbin /usr/share /usr/src /var /opt )
preserve_keywords=( bin boot dev etc home initrd lib proc root sbin sys usr include local share src opt var )
for path in "${preserve_paths[@]}"
do
for arg in "${args[@]}"
do
if [[ $arg = $path ]];
@nellaivijay
nellaivijay / es.sh
Created May 11, 2012 20:16 — forked from aaronshaf/es.sh
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
@macias
macias / CHANGELOG
Last active February 2, 2019 18:23
Coursera Getter [download video lecture]
2014-11-03 * Coursera requires just another authentication key --
`__204u`
2013-12-01 * credentials file is used instead of passing directly
"CAUTH" value
2013-09-24 * ignoring hidden lecture sections
2013-09-06 * ability to download resources by icon class
* added new flags for setting target filename as original
@shrijeet
shrijeet / rack_finder.py
Created June 7, 2012 00:48
Hadoop rack awareness helper script
#!/usr/bin/env python
import sys
import os
"""
Modify this config section based on needs
1) hostrack_data : a file containing lines, a line represents one host
2) field_sep: separator used for fields in one line
3) log: disable/enable logging
@Infro
Infro / dlcourserapreviews.cs
Created June 7, 2012 01:39
Download Course RA's Class's Preview MP4 Videos
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Net;
using System.Windows.Forms;
using System.Diagnostics;
using System.Web;
@cotdp
cotdp / gist:3062892
Created July 6, 2012 21:38
Example ZipFile Job
// Standard stuff
Job job = new Job(conf);
job.setJobName(this.getClass().getSimpleName());
job.setJarByClass(this.getClass());
job.setMapperClass(MyMapper.class);
job.setReducerClass(MyReducer.class);
// Hello there ZipFileInputFormat!
job.setInputFormatClass(ZipFileInputFormat.class);
@bradfitz
bradfitz / diskchecker.pl
Created July 24, 2012 21:05
diskchecker.pl
#!/usr/bin/perl
#
# Brad's el-ghetto do-our-storage-stacks-lie?-script
#
sub usage {
die <<'END';
Usage: diskchecker.pl -s <server[:port]> verify <file>
diskchecker.pl -s <server[:port]> create <file> <size_in_MB>
diskchecker.pl -l [port]
@dsummersl
dsummersl / gist:3744192
Created September 18, 2012 16:40
Example log4j logstash configuration
# one way w/o web interface:
# java -jar lib/playbooks/servers/files/logstash-1.1.1-monolithic.jar agent -f lib/playbooks/servers/files/logstash.conf
# another with a web interface(http://localhost:9292) :
# java -jar lib/playbooks/servers/files/logstash-1.1.1-monolithic.jar agent -f lib/playbooks/servers/files/logstash.conf -- web --backend 'elasticsearch:///?local'
# nc localhost 3333 < logfile
#
# When you are all done, you can delete the 'data' folder to delete the database.
input {
tcp {
# This work is licensed under the GNU Public License (GPL).
# To view a copy of this license, visit http://www.gnu.org/copyleft/gpl.html
# For more information visit this blog post http://mpcabd.igeex.biz/python-celery-asynchronous-task-decorator/
# Written by Abd Allah Diab (mpcabd)
# Email: mpcabd ^at^ gmail ^dot^ com
# Website: http://mpcabd.igeex.biz
from django.utils.decorators import available_attrs