Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
try:
import boto.ec2
except ImportError:
print "failed=True msg='boto required for this module'"
sys.exit(1)
def main():
argument_spec = ec2_argument_spec()
@haad
haad / gist:831c9e0ddb4615fd69dd
Last active August 29, 2015 14:14 — forked from hiroyuki-sato/gist:4564166
OpenAM ssoadm configuration

ssoadm Batch Example

Command

# ${SSOADM} do-batch -u amadmin -f ${PWDFILE}  -Z ${BATCH_FILE} --batchstatus ${BATCH_OUTPUT_FILE} 

Realm was created.
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.2.0-29-generic (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #46-Ubuntu SMP Fri Jul 27 17:03:23 UTC 2012 (Ubuntu 3.2.0-29.46-generic 3.2.24)
[ 0.000000] Command line: BOOT_IMAGE=/vmlinuz-3.2.0-29-generic root=UUID=d5460be6-85af-4e1e-9f63-7c2851d8b18f ro quiet splash vt.handoff=7
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
Resolving dependencies...
Using rake (0.8.7)
Using aasm (2.2.0)
Using abstract (1.0.0)
Using activesupport (3.0.20)
Using builder (2.1.2)
Using i18n (0.5.0)
Using activemodel (3.0.20)
Using erubis (2.6.6)
Using rack (1.2.8)
@haad
haad / fingera
Created November 26, 2013 14:10
Running db:init
/var/lib/ruby-gems/fingera_server/gems/1.9.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32: Use RbConfig instead of obsolete and deprecated Config.
/usr/lib/ruby/1.9.1/rake/file_utils.rb:9: warning: already initialized constant RUBY
/usr/lib/ruby/1.9.1/rake/file_utils.rb:86: warning: already initialized constant LN_SUPPORTED
DEPRECATION WARNING: Rake tasks in /srv/apps/fingera/current/vendor/plugins/open_flash_chart/tasks/open_flash_chart_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /srv/apps/fingera/current/Rakefile:7)
(in /srv/apps/fingera/current)
** Invoke db:init (first_time)
** Invoke environment (first_time)
** Execute environment
init local settings error: Could not get fingera station, fingera_id not defined
@haad
haad / gist:7303551
Last active December 27, 2015 09:19
activemq
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="${activemq.clustername}" dataDirectory="${activemq.base}/data" useJmx="true">
<!-- <broker xmlns="http://activemq.apache.org/schema/core" brokerName="webafis_gemalto_test_A" dataDirectory="${activemq.base}/data" useJmx="true"> -->
<destinationPolicy>
description "Innovatrics ActiveMQ startup script."
author "Innovatrics ActiveMQ"
start on runlevel [2345]
stop on runlevel [016]
#expect daemon
setuid activemq
respawn
diff --git a/examples/samplesshd-tty.c b/examples/samplesshd-tty.c
index 7ed70d3..a0d6062 100644
--- a/examples/samplesshd-tty.c
+++ b/examples/samplesshd-tty.c
@@ -25,7 +25,12 @@ clients must be made or how a client should react.
#include <string.h>
#include <stdio.h>
#include <poll.h>
+
+#ifdef __APPLE__
@haad
haad / gist:6681623
Created September 24, 2013 07:53
migastro disk
[ 25.436106] postgres (1155): /proc/1155/oom_adj is deprecated, please use /proc/1155/oom_score_adj instead.
[ 444.853021] ata3.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6
[ 444.853029] ata3.00: BMDMA stat 0x26
[ 444.853034] ata3.00: failed command: WRITE DMA
[ 444.853044] ata3.00: cmd ca/00:28:a0:46:d3/00:00:00:00:00/e6 tag 0 dma 20480 out
[ 444.853044] res 51/84:01:c7:46:d3/00:00:00:00:00/e6 Emask 0x30 (host bus error)
[ 444.853048] ata3.00: status: { DRDY ERR }
[ 444.853052] ata3.00: error: { ICRC ABRT }
[ 444.853065] ata3: soft resetting link
[ 450.048019] ata3: link is slow to respond, please be patient (ready=0)
@haad
haad / rails app upstart init script
Last active December 23, 2015 11:09
Run rails application from upstart with start-stop-daemon
description "Rails Application"
start on runlevel [2345]
stop on runlevel [!2345]
console log
respawn
chdir /srv/apps/rails_path/current
env APP_NAME="rails-app"