source 'http://rubygems.org'
gem 'grape'
gem 'grape-roar'Run bundle install.
I hereby claim:
To claim this, I am signing this object:
| require 'mongoid' | |
| require 'mongoid_collection_snapshot' | |
| Mongoid.load!("mongoid.yml", :development) | |
| class Widget | |
| include Mongoid::Document | |
| end |
| source 'https://rubygems.org' | |
| gem 'grape' | |
| gem 'goliath' | |
| gem 'json' |
| #!/bin/bash | |
| set -e | |
| echo "Backing up MongoDB databases to Dropbox ..." | |
| dt=$(date +"%Y-%m-%d") | |
| echo " today is $dt" |
| #!/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` |
| require 'celluloid/current' | |
| require 'celluloid/io' | |
| require 'http' | |
| require 'websocket/driver' | |
| class Connection | |
| include Celluloid::IO | |
| extend Forwardable | |
| def initialize(url) |
| 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 '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 |
| #!/bin/bash | |
| for D in `find . -type d -name "*bot"` | |
| do | |
| NAME=`basename $D` | |
| echo Restarting $NAME ... | |
| dokku ps:restart $NAME | |
| done |