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
*.aux | |
*.glo | |
*.idx | |
*.log | |
*.toc | |
*.ist | |
*.acn | |
*.acr | |
*.alg | |
*.bbl |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Multi-VM Configuration: Builds Web, Application, and Database Servers using JSON config file | |
# Configures VMs based on Hosted Chef Server defined Environment and Node (vs. Roles) | |
# Author: Gary A. Stafford | |
# read vm and chef configurations from JSON files | |
nodes_config = (JSON.parse(File.read("nodes.json")))['nodes'] | |
chef_config = (JSON.parse(File.read("chef.json")))['chef'] |
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 | |
# Iterate over all listening ssh ports of all VMs | |
for VM_PORT in `vagrant ssh-config | grep Port | awk '{ print $2}'` | |
do | |
echo "Copying ~/.vagrant.d/insecure_private_key to host with ssh listening on port ${VM_PORT}" | |
scp -i ~/.vagrant.d/insecure_private_key -P ${VM_PORT} ~/.vagrant.d/insecure_private_key vagrant@localhost:~/.ssh/id_rsa | |
done |
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
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-webapp \ | |
-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \ | |
-DgroupId=com.example -DartifactId=simple-service-webapp -Dpackage=com.example \ | |
-DarchetypeVersion=2.13 | |
Resource: | |
https://jersey.java.net/documentation/latest/getting-started.html |
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
# Based on http://spredzy.wordpress.com/2013/03/02/monitor-your-cluster-of-tomcat-applications-with-logstash-and-kibana/ | |
# Changed URIPARAMS with GREEDYDATA. URIPARAMS has problem with POST (i.e., no url parameters) | |
filter { | |
grok { | |
type => "access-log" | |
pattern => "%{IP:client} \- \- \[%{DATA:datestamp}\] \"%{WORD:method} %{URIPATH:uri_path}%{GREEDYDATA:params} %{DATA:protocol}\" %{NUMBER:code} %{NUMBER:bytes}" |
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
# Re-directs port 80 to 5601 | |
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 5601 | |
# Apply | |
sudo service iptables restart | |
# Ubuntu |
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
# Simple proxying to tomcat | |
server { | |
listen nginx.server.com:80; | |
server_name nginx.server.com; | |
location / { | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
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
> wget dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
> rpm -ivh epel-release-6-8.noarch.rpm | |
> yum install nrpe nagios-plugins-all openssl | |
Then go to '/etc/nagios/nrpe.cfg ' | |
and update the | |
allowed_hosts=nagios.change_me.com | |
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
# Summary of HDFS filesystem | |
sudo su hdfs -c "hdfs dfsadmin -report" | |
# Check the HDFS filesystem (detail block file) | |
sudo su hdfs -c "hdfs fsck / -files -blocks" |
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
# Generic Aliases | |
alias ll='ls -latr' # List all file in long list format by modification time | |
alias ..='cd ..' # Go up one directory | |
alias ...='cd ../..' # Go up two directories | |
alias ....='cd ../../..' # Go up three directories | |
alias -- -='cd -' # Go back | |
alias c='clear' # Clear Screen | |
alias k='clear' # Clear Screen | |
alias cls='clear' # Clear Screen | |
alias _="sudo" # Execute with sudo |
OlderNewer