This file contains hidden or 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
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " .vimrc | |
| " | |
| " Artem Chistyakov <[email protected]> | |
| " | |
| " Remember that: | |
| " Reload .vimrc without restarting Vim | |
| " :source % | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
This file contains hidden or 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
| post '/contact' do | |
| subject = params[:title] | |
| body = erb :email, :layout => false | |
| begin | |
| transport = Mailer::PostmarkTransport.new(POSTMARK_API_KEY) | |
| transport.send_message(SENDER, RECIPIENT, subject, body) do |message| | |
| message.tag = "contact-form" | |
| end | |
| rescue ArgumentError |
This file contains hidden or 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
| require 'tmail' | |
| require 'postmark' | |
| module Mailer | |
| class PostmarkTransport | |
| attr_accessor :content_type | |
| def initialize(api_key) | |
| Postmark.api_key= api_key | |
| end |
This file contains hidden or 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
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " .vimrc | |
| " | |
| " Artem Chistyakov <[email protected]> | |
| " | |
| " Remember that: | |
| " Reload .vimrc without restarting Vim | |
| " :source % | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
This file contains hidden or 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
| #!/usr/bin/ruby1.9.1 | |
| abort "Specify input and output dirs please" if ARGV.length != 2 | |
| in_dir, out_dir = ARGV | |
| Dir.chdir in_dir | |
| Dir.foreach(in_dir) do |file| | |
| in_file = File.join(in_dir, file) | |
| `ufraw-batch --wb=camera --exposure=auto --out-type=jpeg #{in_file} --out-path=#{out_dir}` |
This file contains hidden or 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
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
| " .vimrc | |
| " | |
| " Artem Chistyakov <[email protected]> | |
| " | |
| " Remember that: | |
| " Reload .vimrc without restarting Vim | |
| " :source % | |
| """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" |
This file contains hidden or 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
| def self.find_by_email(email) | |
| User.new :email => email | |
| if engine_user = EngineUser.find_by_email(email) | |
| return find_by_engine_user_id(engine_user.id) | |
| end | |
| end | |
| def self.find_by_email!(email) | |
| engine_user = self.find_by_email(email) | |
| raise ActiveRecord::RecordNotFound unless engine_user |
This file contains hidden or 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
| module ReplyParser | |
| TEXT_PLAIN_SPLITTER = /^((> )?\/\/ ADD YOUR REPLY ABOVE$)|( *\-\-\-\-\- .+ \-\-\-\-\-)/ | |
| class << self | |
| def parse_reply_text(body) | |
| splitter = TEXT_PLAIN_SPLITTER | |
| prepare_reply_text(body.split(splitter).first) | |
| end | |
| private |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>jquery-dependentSelect</title> | |
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <script type="text/javascript" src="https://raw.github.com/temochka/jquery-dependentSelect/master/jquery.dependentSelect-0.1.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| $('select#single-local-data').dependentSelect({ | |
| isMultiple: false, |
This file contains hidden or 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
| require 'postmark' | |
| require 'mail' | |
| Postmark.api_key = '76bc4c45-5859-4c34-bab7-XXXX' | |
| message = Mail.new do |m| | |
| m.from = '[email protected]' | |
| m.to = '[email protected]' | |
| m.subject = 'Test Message Subject' | |
| m.body = 'Test Message Body' |
OlderNewer