Skip to content

Instantly share code, notes, and snippets.

View cthulhu666's full-sized avatar

Jakub Głuszecki cthulhu666

  • Warsaw, Poland
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cthulhu666 on github.
  • I am plushcthulhu (https://keybase.io/plushcthulhu) on keybase.
  • I have a public key ASCGNItVTstatvDJZL473q49-J0gNHYQ1a8mEshWYXy6LQo

To claim this, I am signing this object:

-- Usage: redis-cli --eval redis_expire_keys.lua <key-pattern> , <ttl-in-seconds>
local keys = redis.call("keys", KEYS[1])
local toExpire = {}
local i = 1 -- "it is customary in Lua to start arrays with index 1"
for _, key in ipairs(keys) do
local val = redis.call('ttl', key)
if val == -1 then
toExpire[i] = key
redis.call('expire', key, ARGV[1])
i = i + 1
[['ED Visits per 1,000', 100],['Average Length of Stay', 5],['Admits per 1,000', 100]].each do |pair|
KeyPerformanceIndicator.where(name: 'ED Visits per 1,000').first_or_create(
target: pair.first,
organization_id: pair.last
)
end
= table_for(@collection) do |t|
- t.span(:names) do |s|
- s.column :name
- s.column :surname
- t.column :email
- t.column :phone
= table_for(@collection) do |t|
- t.span(:names) do |s|
- s.column :name