Skip to content

Instantly share code, notes, and snippets.

View dalibor's full-sized avatar

Dalibor Nasevic dalibor

View GitHub Profile
@dalibor
dalibor / .rspec
Created December 29, 2012 22:34 — forked from coreyhaines/.rspec
--colour
-I app

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@dalibor
dalibor / gist:5077516
Last active December 14, 2015 11:09 — forked from bkimble/gist:1365005
List local memcached keys using Ruby
#!/usr/bin/env ruby
require 'net/telnet'
cache_dump_limit = 100
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3)
slab_ids = []
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c|
matches = c.scan(/STAT items:(\d+):/)
slab_ids = matches.flatten.uniq
end

Writing Commit Messages

One line summary (< 50c)

Longer description (wrap at 72c)

Summary

@dalibor
dalibor / gist:b8fad6ccc9e156488ea1
Last active December 30, 2020 01:08 — forked from trcarden/gist:3295935
SSL with thin
# SSL self signed localhost for rails start to finish, no red warnings.
# 1) Create your private key (any password will do, we remove it below)
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key