Skip to content

Instantly share code, notes, and snippets.

View borisd's full-sized avatar

Boris Dinkevich borisd

View GitHub Profile
@borisd
borisd / gist:8357829
Last active January 2, 2016 20:38
Git homework

Add yourself

  • On the spreadsheet, there is a "Contacts" sheet, please put your bitbucket user under your name.
  • Send me email so I add you to the repository

Excercise

  • Clone [email protected]:bardelas/all.git
  • Add a file "yourname.txt" with something inside
  • Update the server
@borisd
borisd / gist:8357712
Created January 10, 2014 16:41
Home work for learing OOP

Download & Install

Rails Installer

  • Do next->next->next on everything
  • When asks for name and email for git, enter those

Using it

  • You start it by running "Command prompt with Ruby on Rails"
# Your code
def foo(a,b,c)
if a > b
return a
end
end
# One line
def foo(a,b,c)
return a if a > b
<label for='field' tooltip='hello world'>Bla bla</label>
Becomes:
<span class='tooltip'>
<label for='field' tooltip='hello world'>Bla bla</label>
<div class='something'>hello world</div>
</span>
Country Name;ISO 3166-1-alpha-2 code
AFGHANISTAN;AF
ÅLAND ISLANDS;AX
ALBANIA;AL
ALGERIA;DZ
AMERICAN SAMOA;AS
ANDORRA;AD
ANGOLA;AO
ANGUILLA;AI
ANTARCTICA;AQ
Pry.config.editor = "vim"
begin
require 'hirb'
rescue LoadError
# Missing goodies, bummer
end
if defined? Hirb
# Dirty hack to support in-session Hirb.disable/enable
----- REPORT DATA ----------
#<Mail::Message:41232180, Multipart: true, Headers: <From: iPawn Reports <[email protected]>>, <to: [email protected], [email protected], [email protected]
>, <Subject: iPawn report: Weekly Funnel - Affiliates - Linkco>, <Mime-Version: 1.0>, <Content-Type: multipart/mixed; boundary="--==_mimepart_50e9a1fd400a7_2c0614c679cc"; charset=UTF-8>>
----------------------------
---
headers:
From: iPawn Reports <[email protected]>
to: |
[email protected], [email protected], [email protected]
class ReportsMailer < ActionMailer::Base
default :from => "iPawn Reports <[email protected]>"
def report(report, data)
@report = report
attachments["report.csv"] = { :data => data, :mime_type => 'text/csv' }
mail(:to => report.emails,
:subject => "iPawn report: #{@report.name}")
end
end
rake aborted!
500 Command not implemented
/usr/local/lib/ruby/1.9.1/net/smtp.rb:954:in `check_response'
/usr/local/lib/ruby/1.9.1/net/smtp.rb:923:in `getok'
/usr/local/lib/ruby/1.9.1/net/smtp.rb:913:in `quit'
/usr/local/lib/ruby/1.9.1/net/smtp.rb:619:in `do_finish'
/usr/local/lib/ruby/1.9.1/net/smtp.rb:528:in `ensure in start'
/usr/local/lib/ruby/1.9.1/net/smtp.rb:528:in `start'
/app/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/network/delivery_methods/smtp.rb:144:in `deliver!'
/app/vendor/bundle/ruby/1.9.1/gems/mail-2.4.4/lib/mail/message.rb:245:in `deliver!'