First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :development
Then you'll want to rebuild your Docker container to install the gems
First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :development
Then you'll want to rebuild your Docker container to install the gems
# set the base image to Debian | |
# https://hub.docker.com/_/debian/ | |
FROM debian:latest | |
# replace shell with bash so we can source files | |
RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
# update the repository sources list | |
# and install dependencies | |
RUN apt-get update \ |
# lib/paperclip/copy_attachments.rb | |
# Copies S3-stored Paperclip attachments from one AR model to another. | |
# | |
# This module should be mixed into the target AR model. | |
if Gem::Version.new(::AWS::VERSION) >= Gem::Version.new(2) | |
raise NotImplementedError, 'coded for aws-sdk v1' | |
end |
# safe merge | |
# | |
# merge the branch XXXXXXXX-add-example-feature into master | |
# make sure the feature is properly tested and | |
# doesn't break anything in its original context | |
git checkout XXXXXXXX-add-example-feature | |
rake # the test suite MUST NOT raise any error | |
# make sure your local copy of master is up-to-date |
# port of Python's difflib. | |
# | |
# Copyright (c) 2001-2008 Python Software Foundation; All Rights Reserved | |
# Copyright (c) 2008-2011 Kouhei Sutou; All Rights Reserved | |
# | |
# It is free software, and is distributed under the Ruby | |
# license and/or the PSF license. See the COPYING file and | |
# PSFL file. | |
# Carry this code from testunit/testunit project. |
# 1) Create your private key (any password will do, we remove it below) | |
$ cd ~/.ssh | |
$ openssl genrsa -des3 -out server.orig.key 2048 | |
# 2) Remove the password | |
$ openssl rsa -in server.orig.key -out server.key |
class Migration < ActiveRecord::Migration | |
def change | |
create_table :countries do |t| | |
t.string :name | |
t.timestamps | |
end | |
create_table :regions do |t| | |
t.string :short_name |
# encoding: UTF-8 | |
class ActiveRecord::Base | |
# Class method to add destroyable paperclip attachments. | |
# | |
# Example: | |
# has_attached_file :image | |
# has_destroyable_file :image | |
# attr_accessible :image_delete | |
# |
<%= f.input :nome, :collection => get_schools_name, :include_blank => false, :input_html => {:rel => 'autocomplete', :data_default => @school.nome} %> |
By Daniel15 (dan.cx) This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.
Could be modified to be more advanced (match regular expressions to answer questions, etc.)
Questions? See my blog post - http://dan.cx/blog/2011/06/twitter-autoreply-bot-dbznappa
Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1