This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 ]]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ================================================================= | |
| SETTING UP SSHD AS A SERVICE FOR RUNNING HADOOP DAEMONS ON WINDOWS 7 | |
| ================================================================= | |
| Steps: | |
| 1. Download 'setup.exe' from Cygwin website | |
| 2. Right-click on 'setup.exe' | |
| 3. Leave settings as they are, click through until you come to the plugin selection window | |
| 3.1 - Make sure that the installation directory is 'C:\cygwin' |