Skip to content

Instantly share code, notes, and snippets.

View bastosmichael's full-sized avatar
🏠
Working from home

Michael Bastos bastosmichael

🏠
Working from home
View GitHub Profile
@tompesman
tompesman / indexer.rb
Created October 10, 2014 12:45
Sidekiq worker for Elasticsearch with connection pool
module Search
class Indexer
include Sidekiq::Worker
sidekiq_options queue: :low, retry: false, backtrace: true
LOGGER = Sidekiq.logger.level == Logger::DEBUG ? Sidekiq.logger : nil
SEARCH_POOL = ConnectionPool.new(size: SEARCH_UPDATE_POOL, timeout: 5) do
Elasticsearch::Client.new host: ELASTICSEARCH_URL, logger: LOGGER
end
@coderanger
coderanger / README.md
Last active August 18, 2023 18:33
How to patch Ubuntu for Heartbleed

How to patch Ubuntu for Heartbleed

  1. sudo apt-get update
  2. sudo apt-get install -y libssl1.0.0 openssl
  3. openssl version -a and confirm the "built on" date is >= 2014-04-07
  4. sudo lsof -n | grep ssl | grep DEL and restart all listed services.

Repeat #4 until no results are returned.

#!/usr/bin/perl -w
#NetDNA API Sample Code - Perl
#Version 1.0a
use strict;
use JSON;
use Net::OAuth;
use LWP::UserAgent;
use URI;