DevOps and Immutable Delivery
- https://www.nginx.com/blog/devops-and-immutable-delivery/
- https://www.youtube.com/watch?v=nxhc_Ixoxs0
Immutable Infrastructure with Docker and EC2 by Michael Bryzek (Gilt)
document.querySelectorAll('#other-search-engine-list > div.deletable-item').forEach(function(el) { | |
var url = el.querySelector('.url-column div.static-text'); | |
if (url && ( url.textContent.match(/\.blog\.hu/) || url.textContent.match(/wordpress\.com/) )) { | |
console.log(url.textContent); | |
var button = el.querySelector('.row-delete-button'); | |
if (button) { | |
button.click(button); | |
} | |
} | |
}) |
document.querySelectorAll('[type="application/opensearchdescription+xml"]').forEach(function (e) { e.remove() }) |
require "delegate" | |
module MyNamespace | |
class EnvWrapper < SimpleDelegator | |
def array(key, default: [], delim: ",") | |
if value = self[key] | |
value.split(delim) | |
else | |
default | |
end |
class House | |
def self.recite | |
new.recite | |
end | |
attr_reader :start, :glue | |
def initialize(start: "This is", glue: "that") | |
@start = start | |
@glue = glue |
module Sidekiq | |
module Worker | |
module Bulk | |
# Queue a batch of jobs at the same time. The batch is sliced into smaller | |
# batches. To configure the max batch size that is sent to Redis at once | |
# set the `max_bulk_size` sidekiq option for the job class. This option | |
# default to 1000. | |
# | |
# @param args_set [Array] an array of arrays with job arguments | |
# @return [Array] array of the queued job ids |
#!/bin/bash | |
echo "Watching for changes..." | |
red() { | |
str="$1" | |
sed "/[[:<:]]$str/s//$(printf "\033[31m$str\033[0m")/" | |
} | |
green() { |
DevOps and Immutable Delivery
Immutable Infrastructure with Docker and EC2 by Michael Bryzek (Gilt)
require "socket" | |
socket = TCPSocket.new('irc.freenode.net', 6667) | |
def socket.say(message) | |
write("#{message}\r\n") | |
end | |
socket.say("NICK botobot") | |
socket.say("USER botobot 0 * :botobot") |
# source: http://stackoverflow.com/questions/3800202/diff-output-from-two-programs-without-temporary-files | |
diff -y <(git st | grep rb | cut -c 4-) <(find app -name *product.rb) |
#!/bin/bash | |
# Usage: gb rename [gorename options] | |
# Example: | |
# | |
# gb rename -from '"mypackage".AwesomeStruct' -to "EvenMoreAwesomeStruct" | |
# | |
# Install: drop this file on your $PATH somewhere ($HOME/bin seems cool) and you're done. | |
if [ "$1" = "help" ]; then | |
gorename --help |