I hereby claim:
- I am dblock on github.
- I am dblock (https://keybase.io/dblock) on keybase.
- I have a public key whose fingerprint is 4A72 0FE7 90B0 7A68 744E 3716 75BF 031B 7C94 E183
To claim this, I am signing this object:
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 |
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, |
require 'celluloid/current' | |
require 'celluloid/io' | |
require 'http' | |
require 'websocket/driver' | |
class Connection | |
include Celluloid::IO | |
extend Forwardable | |
def initialize(url) |
#!/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` |
#!/bin/bash | |
set -e | |
echo "Backing up MongoDB databases to Dropbox ..." | |
dt=$(date +"%Y-%m-%d") | |
echo " today is $dt" |
source 'https://rubygems.org' | |
gem 'grape' | |
gem 'goliath' | |
gem 'json' |
require 'mongoid' | |
require 'mongoid_collection_snapshot' | |
Mongoid.load!("mongoid.yml", :development) | |
class Widget | |
include Mongoid::Document | |
end |
I hereby claim:
To claim this, I am signing this object:
module Api | |
module V2 | |
module Util | |
module CursorHelpers | |
extend ActiveSupport::Concern | |
# apply cursor-based pagination to a collection | |
# returns a hash: | |
# results: (paginated collection subset) | |
# next: (cursor to the next page) |