Permalink
Browse files

Git blog

  • Loading branch information...
0 parents commit 1166153b1f6fdfbc2de676b092fe1af7b154099e @bogdan committed May 20, 2011
Showing with 9,972 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +102 −0 Rakefile
  3. +9 −0 _config.yml
  4. +15 −0 _extensions/jekyll_ext.rb
  5. +21 −0 _includes/cloud.html
  6. +9 −0 _includes/tags.html
  7. +123 −0 _layouts/default.html
  8. +35 −0 _layouts/post.html
  9. +4 −0 _layouts/tag.html
  10. +74 −0 _posts/2009-04-03-upload-files-with-selenium-ide
  11. +9 −0 _posts/2009-04-08-technical-documentation.html
  12. +8 −0 _posts/2009-04-09-brain-async.html
  13. +22 −0 _posts/2009-04-10-success-components.html
  14. +33 −0 _posts/2009-04-23-clear-upload-file-input-field.html
  15. +61 −0 _posts/2009-04-28-ant-task-to-install-tomcat-service.html
  16. +20 −0 _posts/2009-04-29-some-programming-aphorisms.html
  17. +43 −0 _posts/2009-04-30-update-and-create-timestamps-with-mysql.html
  18. +26 −0 _posts/2009-05-04-jboss-seam-usage-makes-the-application-code-crazy.html
  19. +29 −0 _posts/2009-05-05-what-do-you-expect-from-interface.html
  20. +52 −0 _posts/2009-05-13-how-to-choose-a-good-sexy-title-for-your-article.html
  21. +44 −0 _posts/2009-06-02-avoid-nested-select-double-single-table-complex-query.html
  22. +20 −0 _posts/2009-06-08-pragmatic-review-view-google-wave-criticism-technolog.html
  23. +40 −0 _posts/2009-06-29-bdd-user-stories-productive-tdd-criticism.html
  24. +37 −0 _posts/2009-07-30-computer-science-programming-criticism-object-database-design.html
  25. +58 −0 _posts/2009-10-27-objects-behaviour-inheritance-with-rspec.html
  26. +16 −0 _posts/2009-12-01-vim-as-ruby-on-rails-ide-development-perfomanc.html
  27. +37 −0 _posts/2010-01-24-sql-queries-activerecord-rails-named-scopes-stack.html
  28. +14 −0 _posts/2010-03-29-quality-develop-application-improve-usability-design.html
  29. +69 −0 _posts/2010-04-05-ruby18-private-protected-incapsulatio.html
  30. +35 −0 _posts/2010-04-20-dom-element-class-html-javascript-reference.html
  31. +147 −0 _posts/2010-06-08-nesting-namespace-route-non-flat-controllers-hierarchy-rails.html
  32. +41 −0 _posts/2010-06-30-ultimate-rspec-matcher-to-test-validation.html
  33. +80 −0 _posts/2010-07-11-bdd-rspec-matcher-to-test-named_scope-scoped-rails-3.html
  34. +45 −0 _posts/2010-08-26-populate-db-pattern-fake-data.html
  35. +26 −0 _posts/2010-09-30-good-passwords-theory.html
  36. +62 −0 _posts/2010-11-03-dynamic-context-in-rspec-dont-repeat-yourself.html
  37. +31 −0 _posts/2011-03-18-ajax-jquery-debug-javascript.html
  38. +58 −0 _posts/2011-03-28-do-git-commits-associated-to-hoptoad-errors.html
  39. +42 −0 _posts/2011-04-06-javascript-injection-in-json-inserted-directly-into-script-tag.html
  40. +44 −0 _posts/2011-05-20-migrate-wordpress-jekyll-post-preview.md
  41. +27 −0 atom.xml
  42. +1 −0 build
  43. +178 −0 css/default.css
  44. +129 −0 css/default.sass
  45. +1,231 −0 gusiev_com.sql
  46. BIN images/email.jpg
  47. BIN images/favicon.ico
  48. BIN images/fork.png
  49. BIN images/me.jpg
  50. BIN images/rss.png
  51. +92 −0 importer.rb
  52. +39 −0 index.html
  53. +56 −0 pages/about.html
  54. +12 −0 pages/contacts.html
  55. +3 −0 robots.txt
  56. +9 −0 tags/activerecord.html
  57. +7 −0 tags/ajax.html
  58. +7 −0 tags/ant.html
  59. +7 −0 tags/aphorism.html
  60. +8 −0 tags/application.html
  61. +7 −0 tags/architecture.html
  62. +7 −0 tags/article.html
  63. +7 −0 tags/author.html
  64. +8 −0 tags/bdd.html
  65. +8 −0 tags/behavior.html
  66. +7 −0 tags/behaviour.html
  67. +7 −0 tags/class.html
  68. +7 −0 tags/commit.html
  69. +7 −0 tags/context.html
  70. +7 −0 tags/controller.html
  71. +12 −0 tags/criticism.html
  72. +7 −0 tags/css.html
  73. +7 −0 tags/data.html
  74. +9 −0 tags/database.html
  75. +7 −0 tags/debug.html
  76. +7 −0 tags/design.html
  77. +7 −0 tags/documentation.html
  78. +7 −0 tags/dom.html
  79. +7 −0 tags/element.html
  80. +7 −0 tags/encapsulation.html
  81. +7 −0 tags/escape.html
  82. +7 −0 tags/fake.html
  83. +7 −0 tags/file.html
  84. +7 −0 tags/git.html
  85. +7 −0 tags/hoptoad.html
  86. +10 −0 tags/howto.html
  87. +9 −0 tags/html.html
  88. +7 −0 tags/humor.html
  89. +8 −0 tags/idea.html
  90. +9 −0 tags/index.html
  91. +7 −0 tags/inheritance.html
  92. +7 −0 tags/input.html
  93. +7 −0 tags/interface.html
  94. +7 −0 tags/it-related.html
  95. +9 −0 tags/java.html
  96. +10 −0 tags/javascript.html
  97. +7 −0 tags/jboss.html
  98. +7 −0 tags/jekyll.html
  99. +7 −0 tags/jquery.html
  100. +7 −0 tags/json.html
  101. +7 −0 tags/liquid.html
  102. +7 −0 tags/lsp.html
  103. +7 −0 tags/matcher.html
  104. +7 −0 tags/method.html
  105. +7 −0 tags/migration.html
  106. +7 −0 tags/mind.html
  107. +7 −0 tags/mysql.html
  108. +8 −0 tags/named_scope.html
  109. +7 −0 tags/nesting.html
  110. +7 −0 tags/oop.html
  111. +7 −0 tags/password.html
  112. +8 −0 tags/pattern.html
  113. +7 −0 tags/perfomance.html
  114. +7 −0 tags/php.html
  115. +7 −0 tags/populate.html
  116. +7 −0 tags/privacy.html
  117. +10 −0 tags/programming.html
  118. +7 −0 tags/quality.html
  119. +8 −0 tags/query.html
  120. +9 −0 tags/rails.html
  121. +7 −0 tags/random.html
  122. +7 −0 tags/reader.html
  123. +7 −0 tags/review.html
  124. +7 −0 tags/route.html
  125. +10 −0 tags/rspec.html
  126. +12 −0 tags/ruby.html
  127. +7 −0 tags/science.html
  128. +7 −0 tags/seam.html
  129. +7 −0 tags/security.html
  130. +7 −0 tags/select.html
  131. +7 −0 tags/service.html
  132. +8 −0 tags/sql.html
  133. +7 −0 tags/success.html
  134. +7 −0 tags/tdd.html
  135. +7 −0 tags/technology.html
  136. +8 −0 tags/test.html
  137. +7 −0 tags/testing.html
  138. +7 −0 tags/timestamp.html
  139. +7 −0 tags/title.html
  140. +7 −0 tags/tomcat26px.html
  141. +8 −0 tags/usability.html
  142. +7 −0 tags/user story.html
  143. +7 −0 tags/validation.html
  144. +7 −0 tags/vim.html
  145. +7 −0 tags/wave.html
  146. +7 −0 tags/windows.html
  147. +7 −0 tags/wordpress.html
  148. +7 −0 tags/xss.html
  149. +5,867 −0 wordpress.2011-05-18.xml
@@ -0,0 +1 @@
+_site/
102 Rakefile
@@ -0,0 +1,102 @@
+require 'rubygems'
+require 'jekyll'
+require "fileutils"
+require "sass/plugin"
+
+task :dev => :build do
+ c = Thread.new do
+ `compass watch --sass-dir css --css-dir css`
+ end
+ j = Thread.new do
+ `ejekyll --server --auto`
+ end
+ sleep(1)
+ c.join
+ j.join
+end
+
+task :build => [:tags, :cloud, :sass] do
+ def f(name)
+ File.dirname(__FILE__) + "/" + name
+ end
+ begin
+ FileUtils.mkdir_p(f("build"))
+ FileUtils.mkdir_p(f("tmp"))
+ FileUtils.mv(f("build/.git"), f("tmp"))
+ puts `jekyll --no-auto build`
+ ensure
+ FileUtils.mv(f("tmp/.git"), f("build"))
+ end
+end
+
+desc 'Generate tags page'
+task :tags do
+ puts "Generating tags..."
+
+ include Jekyll::Filters
+
+ FileUtils.mkdir_p("tags")
+ options = Jekyll.configuration({})
+ site = Jekyll::Site.new(options)
+ site.read_posts('')
+ site.tags.sort.each do |tag, posts|
+ html = ''
+ html << <<-HTML
+---
+layout: tag
+title: Posts tagged "#{tag}"
+---
+ <h1 id="#{tag}">Posts tagged "#{tag}"</h1>
+ HTML
+
+ html << '<ul class="posts">'
+ posts.each do |post|
+ post_data = post.to_liquid
+ html << <<-HTML
+ <li><a href="#{post.url}">#{post_data['title']}</a></li>
+ HTML
+ end
+ html << '</ul>'
+
+ File.open("tags/#{tag}.html", 'w+') do |file|
+ file.puts html
+ end
+ end
+ puts 'Done.'
+end
+
+
+task :cloud do
+ puts 'Generating tag cloud...'
+ include Jekyll::Filters
+
+ options = Jekyll.configuration({})
+ site = Jekyll::Site.new(options)
+ site.read_posts('')
+
+ html = ''
+
+ site.tags.sort.each do |category, posts|
+
+ s = posts.count
+ if s > 1
+ font_size = 14 + (s*1.8);
+ html << "<a href=\"/tags/#{category}.html\" title=\"Pages tagged #{category}\" style=\"font-size: #{font_size}px; line-height:#{font_size}px\" rel=\"tag\">#{category}</a> \n"
+ end
+ end
+
+ File.open('_includes/cloud.html', 'w') do |file|
+ file.puts html
+ end
+
+ puts 'Done.'
+end
+
+task :sass do
+ directory = File.dirname(__FILE__) + "/css"
+ Sass::Plugin.options[:template_location] = directory
+ Sass::Plugin.options[:css_location] = directory
+ Sass::Plugin.check_for_updates
+end
+
+
@@ -0,0 +1,9 @@
+rdiscount: true
+pygments: true
+auto: true
+lsi: true
+paginate: 10
+permalink: "/:year/:month/:title"
+url: "http://gusiev.com"
+content_delimeter: "<!--more-->"
+
@@ -0,0 +1,15 @@
+module Jekyll
+
+ class Post
+ def preview_content
+ delimeter = @site.config['content_delimeter'] || '<!-- -**-END-**- -->'
+ self.content.split(delimeter)[0]
+ end
+ end
+
+ AOP.around(Post, :to_liquid) do |post_instance, args, proceed, abort|
+ result = proceed.call
+ result['preview'] = post_instance.preview_content
+ result
+ end
+end
@@ -0,0 +1,21 @@
+<a href="/tags/activerecord.html" title="Pages tagged activerecord" style="font-size: 19.4px; line-height:19.4px" rel="tag">activerecord</a>
+<a href="/tags/application.html" title="Pages tagged application" style="font-size: 17.6px; line-height:17.6px" rel="tag">application</a>
+<a href="/tags/bdd.html" title="Pages tagged bdd" style="font-size: 17.6px; line-height:17.6px" rel="tag">bdd</a>
+<a href="/tags/behavior.html" title="Pages tagged behavior" style="font-size: 17.6px; line-height:17.6px" rel="tag">behavior</a>
+<a href="/tags/criticism.html" title="Pages tagged criticism" style="font-size: 24.8px; line-height:24.8px" rel="tag">criticism</a>
+<a href="/tags/database.html" title="Pages tagged database" style="font-size: 19.4px; line-height:19.4px" rel="tag">database</a>
+<a href="/tags/howto.html" title="Pages tagged howto" style="font-size: 21.2px; line-height:21.2px" rel="tag">howto</a>
+<a href="/tags/html.html" title="Pages tagged html" style="font-size: 19.4px; line-height:19.4px" rel="tag">html</a>
+<a href="/tags/idea.html" title="Pages tagged idea" style="font-size: 17.6px; line-height:17.6px" rel="tag">idea</a>
+<a href="/tags/java.html" title="Pages tagged java" style="font-size: 19.4px; line-height:19.4px" rel="tag">java</a>
+<a href="/tags/javascript.html" title="Pages tagged javascript" style="font-size: 21.2px; line-height:21.2px" rel="tag">javascript</a>
+<a href="/tags/named_scope.html" title="Pages tagged named_scope" style="font-size: 17.6px; line-height:17.6px" rel="tag">named_scope</a>
+<a href="/tags/pattern.html" title="Pages tagged pattern" style="font-size: 17.6px; line-height:17.6px" rel="tag">pattern</a>
+<a href="/tags/programming.html" title="Pages tagged programming" style="font-size: 21.2px; line-height:21.2px" rel="tag">programming</a>
+<a href="/tags/query.html" title="Pages tagged query" style="font-size: 17.6px; line-height:17.6px" rel="tag">query</a>
+<a href="/tags/rails.html" title="Pages tagged rails" style="font-size: 19.4px; line-height:19.4px" rel="tag">rails</a>
+<a href="/tags/rspec.html" title="Pages tagged rspec" style="font-size: 21.2px; line-height:21.2px" rel="tag">rspec</a>
+<a href="/tags/ruby.html" title="Pages tagged ruby" style="font-size: 24.8px; line-height:24.8px" rel="tag">ruby</a>
+<a href="/tags/sql.html" title="Pages tagged sql" style="font-size: 17.6px; line-height:17.6px" rel="tag">sql</a>
+<a href="/tags/test.html" title="Pages tagged test" style="font-size: 17.6px; line-height:17.6px" rel="tag">test</a>
+<a href="/tags/usability.html" title="Pages tagged usability" style="font-size: 17.6px; line-height:17.6px" rel="tag">usability</a>
@@ -0,0 +1,9 @@
+<h4 class="tags">
+ {% for category in post.tags %}
+ <a href="/tags/{{ category }}.html">{{ category }}</a>
+ {% endfor %}
+ {% for category in page.tags %}
+ <a href="/tags/{{ category }}.html">{{ category }}</a>
+ {% endfor %}
+</h4>
+<div class="clear"></div>
@@ -0,0 +1,123 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+ <head>
+ <title>Bogdan Gusiev's blog</title>
+ <meta name="robots" content="follow, all" />
+ <link rel="stylesheet" href="/css/default.css" type="text/css" media="screen" />
+ <link rel="alternate" type="application/rss+xml" title="Bogdan Gusiev's blog RSS Feed" href="/atom.xml" />
+ <link rel="shortcut icon" href="/images/favicon.ico"/>
+ <title>{{ page.title }}</title>
+ <link rel="icon" href="/images/favicon.ico"/>
+ <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
+ </head>
+
+ <body>
+
+ <div id="wrapper">
+
+ <div class="header">
+ <div class="title">
+ <h1><a href="/">Bogdan Gusiev's blog</a></h1>
+ <h4>How to make your Ruby on Rails application</h4>
+ </div>
+
+ <div class="pages">
+ <a href="/">Home</a>
+ <a href="/pages/about.html">About me</a>
+ <a href="/pages/contacts.html">Contacts</a>
+ </div>
+ <a href="/pages/about.html" class="avatar">
+ <img src="/images/me.jpg"/>
+ </a>
+ <div class="clear"></div>
+ <hr/>
+ </div> <!-- Closes header -->
+
+
+ <div id="main">
+
+ <div id="content">
+ {{ content }}
+ </div>
+ <div class="vsplit">
+ </div>
+ <div id="sidebar">
+ <div class="recent-posts">
+ <h2>Recent Posts</h2>
+ <a class="rss" href="/atom.xml">
+ <img src="/images/rss.png" alt="Bogdan Gusiev&#8217;s blog" />
+ </a>
+ <div class="clear"></div>
+ <ul>
+ {% for post in site.posts limit:5 %}
+ <li>
+ <a href='{{ post.url }}'>{{ post.title }}</a>
+ </li>
+ {% endfor %}
+ </ul>
+ </div>
+ <div class="sidebarbox">
+ <h2>Search</h2>
+ <p>Use the form below to search the site:</p>
+ <form method="get" id="searchform" action="">
+ <input type="text" placeholder="Search keywords" name="s" id="searchbox"/>
+ <input type="submit" class="submitbutton" value="Find it" />
+ </form>
+ <script>
+ $('#searchform').submit(function(event) {
+ event.preventDefault();
+ window.location.href = "http://google.com/search?q=site:gusiev.com " + $('#searchbox').val();
+ });
+ </script>
+ </div>
+ <div class="sidebarbox tag-cloud">
+ <h2>Browse by tags</h2>
+ {% include cloud.html %}
+ </div>
+ </div><!-- Closes Sidebar_full -->
+ <div class="clear"></div>
+ </div> <!-- Closes Sidebar -->
+ <div class="clear"></div>
+
+ </div><!-- Closes Main -->
+
+
+ <div class="footer">
+ <hr/>
+ <!--LiveInternet counter-->
+ <script type="text/javascript">
+ document.write("<a href='http://www.liveinternet.ru/click' "+
+ "target=_blank><img src='http://counter.yadro.ru/hit?t40.6;r"+
+ escape(document.referrer)+((typeof(screen)=="undefined")?"":
+ ";s"+screen.width+"*"+screen.height+"*"+(screen.colorDepth?
+ screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+
+ ";"+Math.random()+
+ "' alt='' title='LiveInternet' "+
+ "border='0' width='31' height='31'><\/a>");
+ </script><!--/LiveInternet-->
+ <!--SpyLOG-->
+ <span id="spylog2009244"></span><script type="text/javascript"> var spylog = { counter: 2009244, image: 26, next: spylog }; document.write(unescape('%3Cscript src%3D"http' + (('https:' == document.location.protocol) ? 's' : '') + '://counter.spylog.com/cnt.js" defer="defer"%3E%3C/script%3E')); </script>
+ <!--SpyLOG-->
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-12663165-1");
+ pageTracker._trackPageview();
+ } catch(err) {}</script>
+ The Content of this blog can be published anywhere with the link to original source.
+ </div><!-- Closes morefoot -->
+
+
+
+
+ </body>
+ </html>
+
+
+
@@ -0,0 +1,35 @@
+---
+layout: default
+---
+<div id="post">
+ <h2>
+ {{ page.title }}
+ <div class="date">{{ page.date | date_to_string }}</div>
+ </h2>
+ {{ content }}
+ {% include tags.html %}
+
+ <div id="related">
+ <h3>Related Posts</h3>
+ <ul class="posts">
+ {% for post in site.related_posts limit:3 %}
+ <li><span>{{ post.date | date_to_string }}</span> &raquo; <a href="{{ post.url }}">{{ post.title }}</a></li>
+ {% endfor %}
+ </ul>
+ </div>
+
+ <div id="disqus_thread"></div>
+<script type="text/javascript">
+ var disqus_shortname = 'gusiev'; // required: replace example with your forum shortname
+
+ //var disqus_identifier = '{{ page.url }}';
+ //var disqus_url = '{{ site.url }}{{ page.url }}';
+
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+</div>
+
@@ -0,0 +1,4 @@
+---
+layout: default
+---
+{{ content }}
Oops, something went wrong.

0 comments on commit 1166153

Please sign in to comment.