Skip to content

Instantly share code, notes, and snippets.

View dan1d's full-sized avatar

Daniel Alejandro Dominguez Diaz dan1d

View GitHub Profile
if Rails.env.production?
ActionMailer::Base.smtp_settings = {
user_name: "username",
password: "password",
domain: "kole.herokuapp.com",
address: "smtp.sendgrid.net",
port: 587,
authentication: :plain,
enable_starttls_auto: true
}
// While you can edit this file, it's best to put your changes in
// "User/Preferences.sublime-settings", which overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
en el modelo
def self.build_survey(current_user)
@survey = current_user.surveys.build
end
y en el controller lo llamas
@survey = Survey.build_survey(current_user)
@dan1d
dan1d / gist:5247826
Created March 26, 2013 18:22
robar musica
require 'open-uri'
require "logger"
require 'json'
class UpdatePage
URL = 'http://www.setbeat.com'
REGEX = /playGo.addQueue\((\[{.*\}\])\)/
attr_accessor :urls, :artista
// JPLAYER
$(document).ready(function() {
$(document).pjax('a',{
container: '[data-pjax-container]',
timeout: 5000
})
$('form.navbar-search').submit(function(event) {
$.pjax.submit(event, {
container: '[data-pjax-container]}',
# config/initializer/paperclip.rb
if Rails.env.production?
Paperclip::Attachment.default_options[:storage] = :s3
Paperclip::Attachment.default_options[:s3_credentials] = {
access_key_id: ENV["ACCSES_KEY_ID"],
secret_access_key: ENV['ACCSES_SECRET_KEY'],
bucket: ENV['BUCKET']
}
Paperclip::Attachment.default_options[:s3_host_alias] = "images.kole.com"
end