Skip to content

Instantly share code, notes, and snippets.

Avatar
🐝
Alexa, ask the future of America to be great again! (try it)

Daniel (dB.) Doubrovkine dblock

🐝
Alexa, ask the future of America to be great again! (try it)
View GitHub Profile
View flaky-test-finder.rb
require 'json'
require 'net/http'
require 'optparse'
require 'set'
require 'uri'
require 'octokit'
options = {}
OptionParser.new do |opt|
opt.on('-s', '--start BUILD_NUMBER', 'Require start') { |o| options[:start] = o }
@dblock
dblock / maintainers.txt
Last active December 1, 2022 13:49
Issues that need action in OpenSearch Project
View maintainers.txt
$ ./bin/project -q maintainers missing
https://github.com/opensearch-project/dashboards-notebooks
https://github.com/opensearch-project/ux
View gist:fc2a864713d664f33f6a6bdeac3f518f
I am attesting that this GitHub handle dblock is linked to the Tezos account tz1ivFsNqtfLTSDh7uzqJ6pArNRG13pkJt4a for tzprofiles
sig:edsigtshxfYo5JbUmy38XPrRPwJY98j3nd79WEkVdrhBLVPxMAGSsyR4ai41QTnbygucGMENiRw7axCrFFKk6Cy41zcydx1o9JE
View gist:5f97961819d4c2162abdcd5e4712f2ff
/*
Create Element:
$Rainb.el('div',{'attribute':"value",style:{"color":"red"}},[ (childnodes) ])
becomes: <div attribute="value" style="color: red;"></div>
Append Element
$Rainb.add(element,elementToAppend)
Get Element By Id
$Rainb.id(id);
Create TextNode
$Rainb.tn(text);
@dblock
dblock / test.rb
Created August 13, 2018 23:33
Kramdown parser repro
View test.rb
require 'kramdown'
text = <<-MARKDOWN
# Example
The quick brown fox jumps over the lazy dog.
```ruby
# one
@dblock
dblock / restart-bots.sh
Created June 20, 2018 19:30
Restart all the bots.
View restart-bots.sh
#!/bin/bash
for D in `find . -type d -name "*bot"`
do
NAME=`basename $D`
echo Restarting $NAME ...
dokku ps:restart $NAME
done
View mongoid-collection-snapshot-nil.rb
require 'mongoid'
require 'mongoid-collection-snapshot'
Mongo::Logger.logger.level = Logger::INFO
Mongoid.connect_to 'widgets-and-gadgets', max_pool_size: 16
class Widget
include Mongoid::Document
end
View notify-bot-teams.rb
Team.active.asc(:_id).each do |team|
begin
next if team.premium
STDOUT.write "#{team.name}: "
client = Slack::Web::Client.new(token: team.token)
channels = client.channels_list['channels'].select { |channel| channel['is_member'] }
channels.each do |channel|
STDOUT.write "#{channel['name']} "
client.chat_postMessage(
channel: channel.id,
@dblock
dblock / try.rb
Created June 14, 2016 14:54
Slack celluloid connection test.
View try.rb
require 'celluloid/current'
require 'celluloid/io'
require 'http'
require 'websocket/driver'
class Connection
include Celluloid::IO
extend Forwardable
def initialize(url)
@dblock
dblock / dropbox.sh
Last active September 11, 2020 14:46
Auto-start Dropbox.
View dropbox.sh
#!/bin/bash
DROPBOX_USERS="root"
DAEMON=.dropbox-dist/dropboxd
start() {
echo "Starting dropbox..."
for dbuser in $DROPBOX_USERS; do
HOMEDIR=`getent passwd $dbuser | cut -d: -f6`