Skip to content

Instantly share code, notes, and snippets.

View joekiller's full-sized avatar

Joseph Lawson joekiller

View GitHub Profile
@joekiller
joekiller / gtk-firefox
Created November 1, 2012 03:32
GTK+ and Firefox for Amazon Linux
#!/bin/bash
#GTK+ and Firefox for Amazon Linux
#Written by Joseph Lawson 2012-06-03
#http://joekiller.com
#Free to use but please credit
TARGET=/usr/local
function init()
{
export installroot=$TARGET/src
@joekiller
joekiller / gtk-firefox.sh
Last active October 21, 2021 04:15 — forked from phstc/gtk-firefox.sh
INSTALL FIREFOX ON AMAZON LINUX X86_64 COMPILING GTK+
#!/bin/bash
# GTK+ and Firefox for Amazon Linux
# Written by Joseph Lawson 2012-06-03
# http://joekiller.com
# http://joekiller.com/2012/06/03/install-firefox-on-amazon-linux-x86_64-compiling-gtk/
# chmod 755 ./gtk-firefox.sh
# sudo ./gtk-firefox.sh
@joekiller
joekiller / prep-vagrant-ent
Last active December 22, 2015 16:28
centos6 vagrant
#!/bin/bash
#This script will prep a centos6 box for vagrant box packaging
cat << EOF | tee /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
@joekiller
joekiller / 00 - Get Logstash and logstash-kafka
Last active August 29, 2015 14:21
Logstash 1.4.2 Kafka 0.8.2.0 Quickstart
#!/bin/bash
curl -O https://download.elasticsearch.org/logstash/logstash/logstash-1.4.2.tar.gz
tar xvf logstash*
cd logstash*
GEM_HOME=vendor/bundle/jruby/1.9 GEM_PATH= java -Xmx500m -jar vendor/jar/jruby-complete-1.7.11.jar -S gem install logstash-kafka
cp -R vendor/bundle/jruby/1.9/gems/logstash-kafka-*-java/{lib/logstash/*,spec/*} {lib/logstash/,spec/}
# test install
USE_JRUBY=1 bin/logstash rspec spec/**/kafka*.rb
cd ..
@joekiller
joekiller / gist:a2b5839b3c3ead54989f
Created June 19, 2015 21:28
arch dell m3800 developer edition
acpi
acpid
alsa-oss
alsa-utils
autoconf
automake
awesome
bash
binutils
bison
@joekiller
joekiller / gist:1aaa548cc2f6cfca4410
Created July 10, 2015 18:39
sed for ip to ec2 address
sed -r 's/.*(^[0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/ec2-\1-\2-\3-\4.compute-1.amazonaws.com/g'
@joekiller
joekiller / Vagrantfile
Last active October 1, 2015 20:55
Install Solr-4.8.0 on Centos6 with Tomcat7
# -*- mode: ruby -*-
# vi: set ft=ruby :
$script = <<SCRIPT
yum install -y java-1.7.0-openjdk
iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT
service iptables save
copy_or_get () {
if [ -f "$1" ]; then
cp $1 ./
@joekiller
joekiller / projectalias.sh
Created October 19, 2015 15:09
Dynamically add project specific files, create an alias to access.
#!/usr/env/bash
secrets=$(whoami)
ROOT_DIRS=$(find . -maxdepth 1 ! -path . -type d ! -path './.*' -print | tr '\n' ' ')
for path in $ROOT_DIRS; do
ALIAS=
[[ -f ${path}/.bashrc ]] && ALIAS=". $HOME/${path}/.bashrc;"
[[ -f ${path}/.${secrets}-secrets ]] && ALIAS="${ALIAS}. $HOME/${path}/.${secrets}-secrets;"
[[ ! -z ${ALIAS} ]] && alias $(basename ${path})="${ALIAS}"
done
@joekiller
joekiller / jenkins.json
Created October 20, 2015 17:23
Jenkins EC2 Centos 6 codepipeline and codecommit
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "Jenkins Stack. Using https://aws.amazon.com/marketplace/ordering/ref=dtl_psb_continue?ie=UTF8&productId=74e73035-3435-48d6-88e0-89cc02ad83ee&region=us-east-1 for CentOS 6",
"Parameters" : {
"KeyName": {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instance",
"Type": "AWS::EC2::KeyPair::KeyName",
"ConstraintDescription" : "must be the name of an existing EC2 KeyPair."
@joekiller
joekiller / perf_test_logstash_kafka_input.sh
Last active March 23, 2016 18:50
Test the performance of the logstash-input-kafka plugin.

Old

1 Thread:
2.86MiB 0:00:32 [  91KiB/s] [  91KiB/s]

4 Threads:
2.86MiB 0:00:31 [93.1KiB/s] [93.1KiB/s]

1 Decorated Thread: