Skip to content

Instantly share code, notes, and snippets.

Dragonfly and DigitalOcean

TLDR

Configuring Dragonfly to host files remotely on DigitalOcean Spaces? Pull in the dragonfly-s3_data_store gem, and this is the config for you:

# config/initializers/dragonfly.rb

require 'dragonfly'
@efatsi
efatsi / .bash_profile
Created May 8, 2017 23:16
Bash function for pulling remote heroku database and loading locally
heroku_pg_pull() {
database=$1
environment=$2
if [ "$database" = "" ]; then
echo "Must pass in local database name, maybe one of these?"
cat config/database.yml | grep "database:"
return 1
fi
String json = String("{\"count\":" + String(count) + "}");
int stringLength;
if (count < 10) {
stringLength = 13;
} else if (count < 100) {
stringLength = 14;
} else if (count < 1000) {
stringLength = 15;
} else {

##First turntable meeting 5/19/2015

###Overview

  • RySten, David, Nate, Eli
  • Overall goals (similar to generic Pointless spiel)
  • Interested primarily in Elixir and React for this project
    • will keep an eye out for opportunities for any and all tech choices
  • Want to keep scope reasonable (+ bad-ass avatars)

###Next Steps

module RubySpark
module Configuration
def self.included(base)
base.extend ClassMethods
end
module ClassMethods
def configuration
yield self
int led = 9;
int relay = 2;
int sensor = A0;
int sensorValue;
boolean occupied = false;
void setup() {
pinMode(led, OUTPUT);
require "selenium-webdriver"
require 'uri'
require 'redis'
uri = URI.parse(ENV["LETITSNOW_REDIS_URL"])
$redis = Redis.new(:host => uri.host, :port => uri.port, :password => uri.password)
def download_torrent(torrent)
puts "starting driver"
driver = Selenium::WebDriver.for :chrome
/*
* Setup
*
*
* ||| |||
* |||A||||B|||
* |||C||||D|||
*
*
* A - A5
#include <DoubleCounter.h>
#include <Servo.h>
const int serialPin = 8;
const int registerClockPin = 9;
const int serialClockPin = 10;
const int servoPin = 5;
DoubleCounter counter(serialPin, registerClockPin, serialClockPin);