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 PATH=/opt/chef-server/embedded/bin:$PATH /opt/chef-server/embedded/service/erchef/bin/reindex-chef-server reindex |
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
#cloud-config | |
users: | |
- name: nytint | |
coreos-ssh-import-url: https://s3.amazonaws.com/newsdev-ops/keys.json | |
groups: | |
- docker | |
write_files: | |
- path: /etc/nginx/nginx.conf |
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
module ThreadIO | |
def ThreadIO.puts(s) | |
@@semaphore ||= Mutex.new | |
@@semaphore.synchronize do | |
STDOUT.puts s | |
end | |
Thread.pass | |
end | |
end |
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
module M | |
def value | |
@@value ||= rand(100) | |
end | |
end | |
class A | |
include M | |
end |
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
require 'mixlib/config' | |
module MyConfig | |
extend Mixlib::Config | |
def self.required(name) | |
default(name) {raise "You must provide a configuration value for #{name}."} | |
end | |
config_strict_mode 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
package main | |
func send(c chan int, i int){ | |
c <- i | |
} | |
func main() { | |
c := make(chan int) | |
go send(c, 1) | |
go send(c, 2) |
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
#cloud-config | |
coreos: | |
update: | |
reboot-strategy: etcd-lock | |
etcd: | |
discovery: https://discovery.etcd.io/<TOKEN> | |
addr: $private_ipv4:4001 | |
peer-addr: $private_ipv4:7001 | |
key-file: /etc/etcd-ssl/key.pem |
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 | |
echo "127.0.0.1 `hostname`" >> /etc/hosts | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install openjdk-7-jre | |
cd /tmp | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.1.0.deb | |
dpkg -i elasticsearch-1.1.0.deb | |
echo 'ES_HEAP_SIZE=6g' >> /etc/default/elasticsearch | |
echo 'cluster.name: awesomecluster |
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
RUN \ | |
curl -sfLO http://www.imagemagick.org/download/ImageMagick-6.9.0-4.tar.gz && \ | |
echo 'cf51a1c6ebf627c627a8e6ac20aecce5f1425907c2cdb98c5a60f329c5c6caf2 ImageMagick-6.9.0-4.tar.gz' | sha256sum -c - && \ | |
tar -xzf ImageMagick-6.9.0-4.tar.gz && \ | |
cd ImageMagick-6.9.0-4 && \ | |
./configure --prefix /usr/local && \ | |
make install && \ | |
cd .. && \ | |
rm -rf ImageMagick* |
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
[Unit] | |
Description=mongodb | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
RestartSec=5s | |
TimeoutStartSec=0 | |
KillMode=none |
OlderNewer