This file contains hidden or 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
const hoverTime = 400 | |
const fetchers = {} | |
const doc = document.implementation.createHTMLDocument('prefetch') | |
function fetchPage (url, success) { | |
const xhr = new XMLHttpRequest() | |
xhr.open('GET', url) | |
xhr.setRequestHeader('VND.PREFETCH', 'true') | |
xhr.setRequestHeader('Accept', 'text/html') | |
xhr.onreadystatechange = () => { |
This file contains hidden or 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
FROM alpine | |
COPY configure-node.sh configure-node.sh | |
CMD ["/bin/sh", "configure-node.sh"] |
This file contains hidden or 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 Fail2banNotifier | |
def initialize(options) | |
@default_options = options | |
@default_options[:logfile] ||= Rails.root.join('log', 'fail2ban.log') | |
# Roll over every 30M, keep 10 files | |
@logger ||= Logger.new(@default_options[:logfile], 10, 30*1024*1024) | |
end | |
def call(exception, options={}) |