This file contains 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 | |
# 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 | |
This file contains 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
# sudo java -jar logstash-monolithic.jar agent -f /etc/logstash.conf | |
test | |
{"@source":"stdin://web1.jackthreads.com/","@tags":[],"@fields":{},"@timestamp":"2013-02-12T22:29:09.029Z","@source_host":"web1.jackthreads.com","@source_path":"/","@message":"test","@type":"stdin-type"} | |
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NotImplementedError) stat.st_dev unsupported or native support failed to load | |
at org.jruby.RubyFileStat.dev_major(org/jruby/RubyFileStat.java:394) | |
at RUBY._discover_file(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0.5.0/lib/filewatch/watch.rb:140) | |
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) | |
at RUBY._discover_file(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0.5.0/lib/filewatch/watch.rb:122) | |
at RUBY.watch(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0.5.0/lib/filewatch/watch.rb:34) | |
at RUBY.tail(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0 |
This file contains 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
# sudo java -jar logstash-monolithic.jar agent -f /etc/logstash.conf | |
test | |
{"@source":"stdin://web1.jackthreads.com/","@tags":[],"@fields":{},"@timestamp":"2013-02-12T22:29:09.029Z","@source_host":"web1.jackthreads.com","@source_path":"/","@message":"test","@type":"stdin-type"} | |
Exception in thread "LogStash::Runner" org.jruby.exceptions.RaiseException: (NotImplementedError) stat.st_dev unsupported or native support failed to load | |
at org.jruby.RubyFileStat.dev_major(org/jruby/RubyFileStat.java:394) | |
at RUBY._discover_file(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0.5.0/lib/filewatch/watch.rb:140) | |
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612) | |
at RUBY._discover_file(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0.5.0/lib/filewatch/watch.rb:122) | |
at RUBY.watch(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0.5.0/lib/filewatch/watch.rb:34) | |
at RUBY.tail(jar:file:/usr/local/bin/logstash-1.1.9-monolithic.jar!/gems/filewatch-0 |
This file contains 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
# This is a short collection of tools that are useful for managing your | |
# known_hosts file. In this case, I'm using the '-f' flag to specify the | |
# global known_hosts file because I'll be adding many deploy users on this | |
# system. Simply omit the -f flag to operate on ~/.ssh/known_hosts | |
# Add entry for host | |
ssh-keyscan -H github.com > /etc/ssh/ssh_known_hosts | |
# Scan known hosts | |
ssh-keygen -f /etc/ssh/ssh_known_hosts -H -F github.com |
This file contains 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 ruby | |
# This example demonstrates creating a server with the Rackpace Open Cloud | |
require 'rubygems' #required for Ruby 1.8.x | |
require 'fog' | |
require "base64" #required to encode files for personality functionality | |
def get_user_input(prompt) | |
print "#{prompt}: " |
This file contains 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
- name: check out code | |
git: dest=path/to/dest repo=some_repo version=master | |
environment: | |
GIT_SSH: /tmp/git_ssh.sh | |
git_ssh.sh: | |
#!/bin/sh | |
exec /usr/bin/ssh -o StrictHostKeyChecking=no -i /path/to/git-identity "$@" |
This file contains 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
Variables | |
========== | |
predefined variables : | |
- inventory_hostname (fqdn) (normally the same as ansible.fqdn) | |
- inventory_hostname_short | |
To know the return codes returned by ansible modules, just use plain ansible -vvv to see them : | |
ansible -i ~/ansible/arrfab.net/hosts/hosts.cfg -vvv -m copy -a 'src=files/sysinfo dest=/etc/sysinfo' tungstene.arrfab.net | |
tungstene.arrfab.net | success >> { | |
"changed": true, |
This file contains 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 | |
### BEGIN INIT INFO | |
# Provides: {{ item.service_name }} | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: {{ item.service_description }} | |
### END INIT INFO |
This file contains 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
- name: Create the service init scripts yo | |
template: src=service_init_script.j2 dest=/etc/init.d/{{ item.service_name }} owner=root group=root mode=755 | |
with_items: | |
- { service_name: paymentHandler, service_description: 'Handles payments', service_user: blackjack_attack, service_exec: "{{ application_directory }}/apps/paymentHandler.js" } | |
- { service_name: tablePool, service_description: 'The pool of tables available', service_user: blackjack_attack, service_exec: "{{ application_directory }}/apps/tablePool.js" } | |
- { service_name: userManager, service_description: 'Manages users, apparently', service_user: blackjack_attack, service_exec: "{{ application_directory }}/apps/userManager.js" } | |
sudo: yes |
This file contains 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 | |
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# Forked from: http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Ubuntu 11.10 Oneiric Ocelot | |
# Forked from https://gist.github.com/1287170 | |
# Modified to use NGinx + uwsgi instead of Apache, as well as memcached and supervisord, incorporating ideas from | |
# http://blog.adku.com/2011/10/scalable-realtime-stats-with-graphite.html |
OlderNewer