sudo apt-get update
sudo apt-get install -y libssl1.0.0 openssl
openssl version -a
and confirm the "built on" date is >= 2014-04-07sudo lsof -n | grep ssl | grep DEL
and restart all listed services.
Repeat #4 until no results are returned.
OAuth = require('oauth').OAuth | |
_ = require 'underscore' | |
class LinkedInClient | |
@baseUrl: 'https://api.linkedin.com' | |
@requestTokenUrl: "#{@baseUrl}/uas/oauth/requestToken" | |
@accessTokenUrl: "#{@baseUrl}/uas/oauth/accessToken" | |
@authorizeUrl: "#{@baseUrl}/uas/oauth/authorize" | |
@profileFields: ['id', 'headline', 'first-name', 'last-name', 'public-profile-url', 'picture-url', 'educations', 'positions', 'email-address'] |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
echo '{ | |
"handlers": ["debug"], | |
"name": "push_woot_test", | |
"output": "woot!", | |
"status": 0 | |
}' | nc -w1 127.0.0.1 3030 |
module CarrierWave | |
module MiniMagick | |
def toaster_filter | |
manipulate! do |img| | |
img.modulate '150,80,100' | |
img.gamma 1.1 | |
img.contrast | |
img.contrast | |
img.contrast | |
img.contrast |
# Get rid of color codes | |
mutate { | |
gsub => ["message", "\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", ""] | |
} |
require 'openssl' | |
class String | |
def encrypt(key) | |
cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt | |
cipher.key = Digest::SHA1.hexdigest key | |
s = cipher.update(self) + cipher.final | |
s.unpack('H*')[0].upcase | |
end |
[Unit] | |
Description=MongoDB Database Service | |
Wants=network.target | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/mongodb/mongod.pid | |
ExecStart=/usr/local/bin/mongod --config /etc/mongod.conf | |
ExecReload=/bin/kill -HUP $MAINPID |
# Postfix stuff | |
QUEUEID (?:[A-F0-9]{11}|NOQUEUE) | |
EMAILADDRESSPART [a-zA-Z0-9_.+-=:]+ | |
EMAILADDRESS %{EMAILADDRESSPART:local}@%{EMAILADDRESSPART:remote} | |
RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?::[0-9]+(.[0-9]+)?)?)?) | |
#RELAY (?:%{HOSTNAME:relayhost}(?:\[%{IP:relayip}\](?:%{POSREAL:relayport}))) | |
POSREAL [0-9]+(.[0-9]+)? | |
#DELAYS %{POSREAL:a}/%{POSREAL:b}/%{POSREAL:c}/%{POSREAL:d} | |
DELAYS (%{POSREAL}[/]*)+ | |
DSN %{NONNEGINT}.%{NONNEGINT}.%{NONNEGINT} |
#!/bin/bash | |
# Set the ROOM_ID & AUTH_TOKEN variables below. | |
# Further instructions at https://www.hipchat.com/docs/apiv2/auth | |
ROOM_ID=XXX | |
AUTH_TOKEN=XXX | |
MESSAGE="Hello world!" | |
curl -H "Content-Type: application/json" \ |