Skip to content

Instantly share code, notes, and snippets.

dammer /
Last active Feb 18, 2021
Using Tourmaline in Lucky
# Somewhere in src/handlers ...
require "tourmaline"
module Tourmaline
# Sample bot
class EchoBot < Tourmaline::Client
def echo_command(ctx)
dammer /
Created Feb 23, 2016 — forked from SaltwaterC/
OpenWrt support for Netgear WNR1000v2


As usual, use it at your own risk. I am not to be held responsible for your actions.

Supported devices: WNR1000v2 (tested by me), WNR1000v2-VC (provided by Comcast for free; tested by Douglas Fraser)

Notice: Upgrade WNR1000v2 to the latest factory firmware: Otherwise, the power LED may not behave properly.

You need to place the device into failsafe mode. For booting into failsafe mode, you need to power up the device while holding the reset button with a pin. The power LED should have an amber colour. Hold the button until it is starting to flash green. It starts to flash green after it flashes the amber LED for six times. After that, the device is in failsafe mode, accepting a firmware via its TFTP server. The device should respond to pings at, although the responses may be malformed.

dammer / ree-1.8.7-2011.03
Last active Sep 3, 2015 — forked from fgrehm/ree-1.8.7-2011.03
ruby-build REE definitions for Ubuntu 12.04
View ree-1.8.7-2011.03
How to install older versions of REE with rbenv on Ubuntu 12.04
Rbenv won't compile REE 2011.03 properly on Ubuntu 12.04, failing with an error in
If you want to keep tcmalloc functionality, you can do it like this:
Open ~/.rbenv/plugins/ruby-build/share/ruby-build/ree-1.8.7-2011.03
Replace the file's contents with those from fgrehm's gist
# Update, upgrade and install development tools:
apt-get update
apt-get -y upgrade
apt-get -y install build-essential libreadline-dev git-core
# Install rbenv
git clone git:// /usr/local/rbenv
# Add rbenv to the path:
echo '# rbenv setup' > /etc/profile.d/
View gist:4705799
SELECT nspname || '.' || relname AS "relation",
pg_size_pretty(pg_relation_size(C.oid)) AS "size", pg_size_pretty(pg_total_relation_size(C.oid)) AS "total size(with indexes)"
FROM pg_class C
LEFT JOIN pg_namespace N ON (N.oid = C.relnamespace)
WHERE nspname NOT IN ('pg_catalog', 'information_schema')
ORDER BY pg_relation_size(C.oid) DESC;
dammer / gist:4087910
Created Nov 16, 2012 — forked from kt103099/gist:3183125
View gist:4087910
Omniauth Facebook Error - Faraday::Error::ConnectionFailed
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, '<key from fb>', '<another key from fb>'
class SessionsController < ApplicationController
def create