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
trap('INT') { puts 'Au revoir.'; exit 0 } | |
require 'someslowassgem' | |
def main | |
# do stuff like | |
loop {} | |
end | |
begin |
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
type=SYSCALL msg=audit(1422400641.534:1763): arch=c000003e syscall=59 success=yes exit=0 a0=15caf68 a1=17f3908 a2=1704008 a3=7fffe0699d10 items=2 ppid=24788 pid=30307 auid=2001 uid=2001 gid=2001 euid=2001 suid=2001 fsuid=2001 egid=2001 sgid=2001 fsgid=2001 tty=pts5 ses=627 comm="ls" exe="/bin/ls" key=(null) | |
type=EXECVE msg=audit(1422400641.534:1763): argc=2 a0="ls" a1="--color=auto" | |
type=CWD msg=audit(1422400641.534:1763): cwd="/var/log" | |
type=PATH msg=audit(1422400641.534:1763): item=0 name="/bin/ls" inode=393530 dev=ca:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 | |
type=PATH msg=audit(1422400641.534:1763): item=1 name=(null) inode=526546 dev=ca:01 mode=0100755 ouid=0 ogid=0 rdev=00:00 |
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
"PublicELB" : { | |
"Type" : "AWS::ElasticLoadBalancing::LoadBalancer", | |
"Properties" : { | |
"SecurityGroups" : [ { "Ref" : "PublicELBSecurityGroup" } ], | |
"Subnets" : { "Ref" : "PublicSubnetIds" }, | |
"Listeners" : | |
[ | |
{ "LoadBalancerPort" : "443", | |
"InstancePort" : "80", | |
"Protocol" : "HTTPS", |
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
environment = node.chef_environment | |
role = 'statsd' | |
# search for statsd host | |
statsd_host = search(:node, "roles:#{role} AND chef_environment:#{environment}").sort.first | |
puts statsd_host['ipaddress'] | |
> 10.0.0.75 |
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
{ | |
"id": "statsd", | |
"run_list": ["role[statsd]"], | |
"automatic": { | |
"ipaddress": "10.0.0.75", | |
"roles": ["statsd"] | |
} | |
} |
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
--- | |
driver_plugin: vagrant | |
provisioner: | |
name: chef_zero |
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
--- | |
driver: | |
name: vagrant | |
provisioner: | |
name: chef_zero | |
platforms: | |
- name: ubuntu-12.04 |
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
# Edit the crontab | |
vi /etc/crontab | |
# Add your entry | |
52 10 * * * root echo 'hello' >> /tmp/hello | |
# Restart crond | |
RackStation> /usr/syno/etc.defaults/rc.d/S04crond.sh stop | |
stop crond | |
RackStation> /usr/syno/etc.defaults/rc.d/S04crond.sh start |
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 add-apt-repository ppa:openswan/ppa | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
======================================== | |
net.ipv4.conf.all.accept_redirects = 1 | |
net.ipv4.conf.all.secure_redirects = 1 | |
net.ipv4.conf.all.send_redirects = 1 | |
net.ipv4.conf.default.accept_redirects = 1 |
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
#!/opt/chef/embedded/bin/ruby | |
# | |
# Author:: Adam Jacob (<[email protected]>) | |
# Copyright:: Copyright (c) 2010 Opscode, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
NewerOlder