Skip to content

Commit

Permalink
Forgot to add files
Browse files Browse the repository at this point in the history
  • Loading branch information
iafonov committed Oct 6, 2009
1 parent 3dc4357 commit 4afd156
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 70 deletions.
5 changes: 3 additions & 2 deletions Rakefile
Expand Up @@ -92,8 +92,9 @@ namespace 'gallery' do

src_dir = ENV["src"]

Dir.foreach(src_dir) do |gallery_dir|
gallery_path = File.join(File.join(Dir.pwd, src_dir), gallery_dir)
Dir.foreach(src_dir) do |gallery_dir|
gallery_path = File.join(File.join(Dir.pwd, src_dir), gallery_dir)

if (File.directory?(gallery_path))
process_directory(gallery_path, gallery_dir)
end
Expand Down
6 changes: 3 additions & 3 deletions config/config.rb
Expand Up @@ -3,10 +3,10 @@ def connect_to_db(mode)
:adapter => 'mysql',
:encoding => 'utf8',
:username => 'root',
:password => '1',
#:password => '1',
:host => 'localhost',
#:socket => '/var/lib/mysql/mysql.sock',
:socket => '/var/run/mysqld/mysqld.sock',
:socket => '/var/lib/mysql/mysql.sock',
#:socket => '/var/run/mysqld/mysqld.sock',
:database => 'blog_' + mode.to_s
)
end
Expand Down
4 changes: 4 additions & 0 deletions controllers/about.rb
@@ -1,3 +1,7 @@
get '/about' do
haml :about_me
end

get '/cv' do
haml :cv
end
2 changes: 1 addition & 1 deletion controllers/blog.rb
Expand Up @@ -8,7 +8,7 @@
require 'util/sessions.rb'

get '/blog' do
@posts = Post.all()
@posts = Post.all(:order => 'created_at DESC')
haml :blog, :layout => :layout_blog
end

Expand Down
19 changes: 9 additions & 10 deletions controllers/gallery.rb
Expand Up @@ -6,10 +6,13 @@ class Image
attr_accessor :image_path
attr_accessor :path

@@exif_date_format = '%Y:%m:%d %H:%M:%S'


def initialize(path_to_gallery, image)
@image_path = image
@path = path_to_gallery
# @image = Magick::Image.read(relative_to_absolute(path)).first
@path = path_to_gallery
#@image = Magick::Image.read(path).first
end

def preview_path
Expand All @@ -20,10 +23,10 @@ def path
"#{@path}/#{@image_path}"
end

def date_taken
# date = @image.get_exif_by_entry('DateTime')[0][1]
# DateTime.strptime(date, EXIF_DATE_FORMAT) if date
"13 Oct 2009"
def date_taken
#date = @image.get_exif_by_entry('DateTime')[0][1]
#date = DateTime.strptime(date, @@exif_date_format) if date
#date.strftime('%d %m %Y')
end
end

Expand All @@ -37,10 +40,6 @@ def initialize(name)
end
end

class GllaeryLoader

end

def valid?(image)
return image.include?(".jpg")
end
Expand Down
3 changes: 2 additions & 1 deletion main.rb
Expand Up @@ -3,6 +3,7 @@
require 'rubygems'
require 'sinatra'
require 'activerecord'
require 'sass'

require 'util/flash.rb'

Expand All @@ -25,4 +26,4 @@

Dir.foreach("controllers") do |file|
load "controllers/#{file}" unless File.directory? file
end
end
Binary file modified public/me.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 11 additions & 44 deletions views/about_me.haml
Expand Up @@ -4,55 +4,22 @@
%head
%title Igor Afonov
%link{ :rel=>"stylesheet", :href=>"/style.css", :type=>"text/css"}
%link{ :rel => "icon", :href => "/avatar.png"}
%body{ :id => "about" }
#content
= partial :navigation
%p
%img{ :id => 'me', :src => '/me.jpg', :align => 'right' }
.mark Education
%p
I was born in Donetsk in 1985. In 2007 I've graduated from Donetsk National Technical University (I've received
%a{:href => "http://masters.donntu.edu.ua/2007/fvti/afonov/indexe.htm"} master degree in CS
and bachelor degree in business management).
%img{ :id => 'me', :src => '/me.jpg', :align => 'right' }
%p
I'm working as software developer in a small IT company
%a{:href => "http://anahoret.com"}Anahoret.
Software development for me is more than just a work - it's my hobby.
%h2 Igor Afonov
.mark Interests
%p Specific areas of my professional interest include:
%b Java
&ndash; in java my favorite feature is its (<i>unlimited</i>) power and simplicity. Other attractive features for me is:
%ul
%li Java (and JVM) itself as language
%li Parallel programming
%li Dependency injection containers (Google Guice, Tapestry IoC). I have experience in building my own, custom IoC container based on annotations
%li Dynamic languages built on top of the JVM (Groovy, JRuby)
%li Web-frameworks: Tapestry 5, custom made frameworks
%b Ruby
&ndash; the main feature of ruby that attracts me is its outstanding flexibility and code expressiveness (though its inherent for the most dynamic languages). Ruby-linked technologies that attract me are:
%ul
%li
Lightweight web-framework Sinatra (This site is powered by Sinatra,
%a{ :href => "/" } Read more...
)
%li Haml+Sass template engine, I like that simple concepts that lay in base of this technologies, maybe if I ever overcome my laziness I will port this beautiful technology to Java.
%b C++
&ndash; I like this old and fundamental language. I've closely worked with this language for 1.5 years - I've participated in development of enterprise 3D CAD system it was really intresting and challenging work. I've closely worked with OpenGL, STL and Boost.
%ul
%li I've worked for 1.5 years with C++ building 3D CAD application
%p
You can contact me by
%a{:href => "mailto:afonov@gmail.com"} afonov@gmail.com
or via my page on
%a{:href=>""}linkdein.
%p
My full CV avaible
%a{:href => "cv.pdf"}here.
%ul
%li <a href="mailto:afonov@gmail.com">afonov@gmail.com</a>
%li <a href="http://github.com/iafonov">github.com/iafonov</a>
%li <a href="http://www.linkedin.com/in/iafonov">linkedin.com/in/iafonov</a>
%li <a href="skype:iafonov?chat" class="skype">iafonov</a>
%br
%li <a href="cv">My CV</a>
4 changes: 2 additions & 2 deletions views/blog.haml
Expand Up @@ -3,10 +3,10 @@
.mark 22.01.2008
.post-title
%a{:href => "posts/#{post.id}"}= post.title
%a{:href => "posts/#{post.id}#comments", :style => "font-size: 75%"}= "(#{post.comments.count})"
.post-body
= format post.body
.post-footer
%a{:href => "posts/#{post.id}#comments"}= "Comments(#{post.comments.count})"
.post-footer
= for_me "%a{ :href => 'posts/edit/#{post.id}' } Edit"
= for_me "%a{ :href => 'posts/delete/#{post.id}' } Delete"

Expand Down
2 changes: 2 additions & 0 deletions views/layout_blog.haml
Expand Up @@ -3,6 +3,8 @@
%meta{"http-equiv" => 'Content-Type', "content" => 'text/html'}
%head
%link{ :rel=>"stylesheet", :href=>"/style.css", :type=>"text/css"}
%link{ :rel => "icon", :href => "/avatar.png"}
%title Blog
%body{ :id => "blog" }
#content
Expand Down
34 changes: 27 additions & 7 deletions views/style.sass
@@ -1,11 +1,11 @@
#navigation
:padding-top 2em
:margin-left -0.25em
:font-size 130%

a
:padding-right 0.25em
:padding-left 0.25em

:padding-left 0.25em
:text-decoration none

&:hover
Expand Down Expand Up @@ -33,20 +33,23 @@ a
:background-color black

#flash
:color white
:background-color black
:color red
:text-align center

#content
:font-family Helvetica, Arial, sans-serif
:margin-left 8em
:margin-right 8em
:width 765px
:width 546px

.post-title
:font-size 20px
:padding-top 5px

.post-body
:padding-top 10px
:padding-bottom 10px

.post-footer
:padding-bottom 20px

Expand Down Expand Up @@ -77,7 +80,13 @@ a
:padding 1px 2px

#me
:padding-left 10px
:padding-top 10px
:padding-right 15px

.skype
:background transparent url(/images/skype.png) no-repeat
:background-position -3px 0px
:padding-left 20px

.mark
:float left
Expand Down Expand Up @@ -117,4 +126,15 @@ a
:font bold 10px, Helvetica, Arial, sans-serif
:text-align left
:position absolute
:z-index 1000
:z-index 1000

.code
:font-family 'Bitstream Vera Sans Mono','Courier',monospace
:font-size 0.8em
:padding-top 5px
:padding-bottom 5px

.cite
:font-size 0.8em
:font-style italic

0 comments on commit 4afd156

Please sign in to comment.