Skip to content

Instantly share code, notes, and snippets.

`Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer = true. To disable this message and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this option will be removed in 5.0. (/home/diaspora/diaspora/vendor/bundle/ruby/2.6.0/gems/sidekiq-cron-1.2.0/lib/sidekiq/cron/job.rb:464:in `block in save')
`Redis#exists(key)` will return an Integer in redis-rb 4.3. `exists?` returns a boolean, you should use it instead. To opt-in to the new behavior now you can set Redis.exists_returns_integer = true. To disable this message and keep the current (boolean) behaviour of 'exists' you can set `Redis.exists_returns_integer = false`, but this option will be removed in 5.0. (/home/diaspora/diaspora/vendor/bundle/ruby/2.6.0/gems/sidekiq-cron-1.2.0/lib/sidekiq/cron/job.rb:464:in `block in save')
`Redis#exists(key)` will return an Integer
@lgwapnitsky
lgwapnitsky / deletebot.py
Created June 6, 2017 13:25
bot to delete messages in slack - based on demo from slackclient api
from slackeventsapi import SlackEventAdapter
from slackclient import SlackClient
import os
import time
SLACK_VERIFICATION_TOKEN = os.environ["SLACK_VERIFICATION_TOKEN"]
slack_events_adapter = SlackEventAdapter(SLACK_VERIFICATION_TOKEN, "/slack/events")
SLACK_BOT_TOKEN = os.environ["SLACK_BOT_TOKEN"]
CLIENT = SlackClient(SLACK_BOT_TOKEN)
<style>
tr.ms-viewheadertr {
display: none
}
IMG[id='MSOImageWebPart_WebPartWPQ8'] {
height: 400px!important;
}
</style>
@lgwapnitsky
lgwapnitsky / CSV_Breakdown_By_Date.ps1
Last active August 29, 2015 14:16
Breaking down CSV file information by date
$files = dir *.csv | where {$_.length -gt 0}
$z = foreach ($file in $files) {
write-progress -id 1 -activity $file.name -status "processing..."
$x = import-csv $file
$y = new-object -type psobject -Property @{
Project = $file.basename
Total = $x.count
Nov2014 = ($x | where {($_.date -ne $null) -and ([datetime]$_.date -gt [datetime]::parse("11-1-2014")) -and ([datetime]$_.date -lt [datetime]::parse("12-1-2014"))}).count
Dec2014 = ($x | where {($_.date -ne $null) -and ([datetime]$_.date -gt [datetime]::parse("12-1-2014")) -and ([datetime]$_.date -lt [datetime]::parse("1-1-2015"))}).count