Skip to content

Instantly share code, notes, and snippets.

View tadassce's full-sized avatar
✌️

Tadas Ščerbinskas tadassce

✌️
View GitHub Profile
@tadassce
tadassce / sub.rb
Created September 21, 2017 08:40
Subscribe to Redis HSET events
require 'redis'
redis = Redis.new
redis.config(:set, 'notify-keyspace-events', 'Eh')
redis.psubscribe('__keyevent@*__:hset') do |on|
on.pmessage do |_pattern, _channel, hash_key|
puts "Hash #{hash_key} has been updated."
end

Keybase proof

I hereby claim:

  • I am tadassce on github.
  • I am tadassce (https://keybase.io/tadassce) on keybase.
  • I have a public key ASC5bIw9k5TEl99NkRtYtEoclHXPGHc9zzH4z6T8JTkFmQo

To claim this, I am signing this object:

<style>
li {
list-style-position: inside;
}
li:nth-child(3n), li:nth-child(5n) {
list-style-type: none;
}
li:nth-child(3n):before {
content: 'Fizz';
}
<style>
body {
counter-reset: n;
}
div:before {
counter-increment: n;
content: counter(n);
}
div:nth-child(3n):before {
content: "Fizz";
# encoding: UTF-8
module Kernel
alias_method :λ, :lambda
end
@tadassce
tadassce / shenanigan.rb
Last active October 13, 2015 08:47
Shenanigan
# encoding: utf-8
def  ( )
 *2
end
  =   4
puts