This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Userable | |
module Userable | |
def self.included(base) | |
base.has_one :user, :as => :userable, :dependent => :destroy, :autosave => true | |
base.validate :user_must_be_valid | |
base.alias_method_chain :user, :autobuild | |
base.extend ClassMethods | |
base.define_user_accessors | |
end | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"lang": "en", | |
"locale": "en-US", | |
"charset": "UTF-8", | |
"indentation": "\t", | |
"newline": "\n" | |
}, | |
"css": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This example is for a blog post that can be found at http://danhough.com/blog/dropzone-cloudinary/ - read there to find out how to use it --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Dropzone Example</title> | |
</head> | |
<body> | |
<div id="dropzone-area" style="width:700px;height:700px;display:block;margin:20px auto;border:1px solid red;"></div> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dropzone/4.0.1/dropzone.js"></script> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "aws" { | |
version = "~> 1.9" | |
region = "eu-central-1" | |
} | |
resource "aws_kms_key" "mykey" { | |
description = "This key is used to encrypt bucket objects" | |
deletion_window_in_days = 10 | |
} | |
resource "aws_s3_bucket" "mybucket" { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
override: | |
- bundle exec rspec spec | |
deployment: | |
acceptance: | |
branch: master | |
commands: | |
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>: | |
timeout: 300 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app / assets / javascripts / active_admin.js | |
//= require active_admin/base | |
//= require jquery.ui.widget | |
//= require jquery.iframe-transport | |
//= require jquery.fileupload | |
//= require cloudinary/jquery.cloudinary | |
//= require attachinary | |
//= require attachments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// only for desktop for now, | |
@media screen and (min-width: 1008px) { | |
/* during entering and leaving : */ | |
.page-enter-active, .page-leave-active { | |
position:absolute; | |
max-width:725.328px; /*make sur our content keep it's original width*/ | |
transition: all .2s ease; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is a simple AWS Lambda function that will look for a given file on S3 and return it | |
* passing along all of the headers of the S3 file. To make this available via a URL use | |
* API Gateway with an AWS Lambda Proxy Integration. | |
* | |
* Set the S3_REGION and S3_BUCKET global parameters in AWS Lambda | |
* Make sure the Lambda function is passed an object with `{ pathParameters : { proxy: 'path/to/file.jpg' } }` set | |
*/ | |
var AWS = require('aws-sdk'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
# default gems here | |
#--------------------------- | |
# add paperclip and bootstrap | |
gem "paperclip", "~> 4.1" | |
gem 'bootstrap-sass', '~> 3.1.1' |
OlderNewer