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/sh | |
### BEGIN INIT INFO | |
# Provides: haproxy | |
# Required-Start: $local_fs $network $remote_fs | |
# Required-Stop: $local_fs $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: fast and reliable load balancing reverse proxy | |
# Description: This file should be used to start and stop haproxy. | |
### 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
-- SOAs table since split in sqlite is tricky | |
CREATE TABLE soas ( | |
id INTEGER PRIMARY KEY, | |
domain_id INTEGER NOT NULL, | |
mname VARCHAR(255) NOT NULL COLLATE NOCASE, | |
rname VARCHAR(255) NOT NULL COLLATE NOCASE, | |
serial INTEGER NOT NULL, | |
refresh INTEGER NOT NULL, | |
retry INTEGER NOT NULL, | |
expiry INTEGER NOT NULL, |
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 'uri' | |
require 'net/http' | |
require 'net/https' | |
require 'nokogiri' | |
def get_stations(line) | |
uri = URI("http://www.ratp.fr/horaires/fr/ratp/rer/choix-arret-direction/#{line}") | |
response = Net::HTTP.get_response(uri) | |
if response.is_a? Net::HTTPSuccess | |
doc = Nokogiri::HTML(response.body) |
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
import javax.net.ssl.SSLSocket; | |
import javax.net.ssl.SSLSocketFactory; | |
import java.io.*; | |
/** Establish a SSL connection to a host and port, writes a byte and | |
* prints the response. See | |
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services | |
*/ | |
public class SSLPoke { | |
public static void main(String[] args) { |
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 | |
require "rss" | |
require "yaml" | |
require "getoptlong" | |
opts = GetoptLong.new( | |
[ '--feeds', '-f', GetoptLong::REQUIRED_ARGUMENT ], | |
[ '--delta', '-d', GetoptLong::REQUIRED_ARGUMENT ], | |
) |
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 "ilorb" | |
search(:node, "bootstrap_ilo:*").sort_by{|n| n.name}.each do |n| | |
print "#{n.name} " | |
ilo_attrs = n["bootstrap"]["ilo"] | |
begin | |
ilo = ILORb.new(hostname: ilo_attrs["ip"], login: ilo_attrs["username"], password: ilo_attrs["password"]) | |
ilo.server_name(:value => n["hostname"]) |
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
OptionParser.new do |o| | |
o.on('-H', '--host hostname') { |hostname| @host = hostname } | |
o.on("-p", "--port port") { |port| @port = port } | |
o.on('-h') { puts o; exit } | |
o.parse! | |
end | |
raise OptionParser::MissingArgument if @host.nil? | |
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
auto lo | |
iface lo inet loopback | |
auto bond0 | |
iface bond0 inet manual | |
slaves eth0 eth1 | |
bond_mode 802.3ad | |
bond_miimon 100 | |
bond_downdelay 200 | |
bond_updelay 200 |
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
class Chef | |
module DSL | |
module DataQuery | |
def encrypted_data_bag_item(bag, item) | |
secret = Chef::EncryptedDataBagItem.load_secret(File.join(node["chef"]["config_dir"], "encrypted_databags_secrets", bag, item)) | |
Chef::EncryptedDataBagItem.load(bag, item, secret) | |
end | |
end | |
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
source "https://rubygems.org" | |
gemspec |
OlderNewer