Permalink
Browse files

init

  • Loading branch information...
0 parents commit dbed5e06dd77786f78a84f5c24c2c76952972201 @gacha committed Apr 8, 2012
Showing with 3,654 additions and 0 deletions.
  1. +10 −0 .gitignore
  2. 0 .nojekyll
  3. +10 −0 404.html
  4. +1 −0 CNAME
  5. +1 −0 README.md
  6. +306 −0 Rakefile
  7. +22 −0 _categories.html
  8. +118 −0 _config.yml
  9. +14 −0 _includes/JB/analytics
  10. +12 −0 _includes/JB/analytics-providers/getclicky
  11. +11 −0 _includes/JB/analytics-providers/google
  12. +11 −0 _includes/JB/analytics-providers/mixpanel
  13. +37 −0 _includes/JB/categories_list
  14. +16 −0 _includes/JB/comments
  15. +14 −0 _includes/JB/comments-providers/disqus
  16. +9 −0 _includes/JB/comments-providers/facebook
  17. +6 −0 _includes/JB/comments-providers/intensedebate
  18. +6 −0 _includes/JB/comments-providers/livefyre
  19. +32 −0 _includes/JB/liquid_raw
  20. +37 −0 _includes/JB/pages_list
  21. +55 −0 _includes/JB/posts_collate
  22. +22 −0 _includes/JB/setup
  23. +8 −0 _includes/JB/sharing
  24. +33 −0 _includes/JB/tags_list
  25. +12 −0 _includes/_disqus_count_js.html
  26. +52 −0 _layouts/default.html
  27. +5 −0 _layouts/index.html
  28. +14 −0 _layouts/page.html
  29. +51 −0 _layouts/post.html
  30. +193 −0 _locales/lv.yml
  31. +38 −0 _plugins/debug.rb
  32. +26 −0 _plugins/i18n_filter.rb
  33. +17 −0 _posts/2006-10-05-ie-uz-linuxa.html
  34. +17 −0 _posts/2006-10-06-miljons-paldies.html
  35. +35 −0 _posts/2006-10-10-7-dienu-backups.html
  36. +32 −0 _posts/2006-10-19-irc-jocii.html
  37. +17 −0 _posts/2006-10-25-ta-nu-beidzot-silts.html
  38. +17 −0 _posts/2006-11-04-javascript-un-3d.html
  39. +27 −0 _posts/2006-11-06-ubuntu-610.html
  40. +17 −0 _posts/2006-11-07-pirmais-pirkums-amazon.html
  41. +23 −0 _posts/2006-11-09-no-ubuntu-uz-kubuntu.html
  42. +21 −0 _posts/2006-11-10-shit-happens.html
  43. +24 −0 _posts/2006-11-17-ubuntu-t-krekli.html
  44. +41 −0 _posts/2006-11-23-ieskats-django.html
  45. +18 −0 _posts/2006-11-29-borat.html
  46. +17 −0 _posts/2006-12-06-epasta-prbaude.html
  47. +58 −0 _posts/2006-12-07-web-freimworku-saldzinana.html
  48. +35 −0 _posts/2006-12-13-web-programmanas-valodas.html
  49. +55 −0 _posts/2006-12-19-tabulu-rindu-krsoana-ar-prototype.html
  50. +17 −0 _posts/2007-01-22-sniegs.html
  51. +57 −0 _posts/2007-01-26-django-autocompletefield.html
  52. +21 −0 _posts/2007-01-26-fona-bildte.html
  53. +24 −0 _posts/2007-01-31-python-un-psyco.html
  54. +46 −0 _posts/2007-03-04-mana-jaun-dulkore.html
  55. +32 −0 _posts/2007-03-06-nejaua-teksta-enercija-ar-pil.html
  56. +93 −0 _posts/2007-03-21-wine-smuks-krss.html
  57. +17 −0 _posts/2007-04-10-viendu-attlu-meklana-un-dzana.html
  58. +47 −0 _posts/2007-04-11-eburi-uz-ascii.html
  59. +36 −0 _posts/2007-04-23-teksta-redaktors---scribes.html
  60. +17 −0 _posts/2007-04-23-wall-of-the-world.html
  61. +17 −0 _posts/2007-06-14-domu-lastjs.html
  62. +19 −0 _posts/2007-07-09-krtbai-ir-nozme.html
  63. +23 −0 _posts/2007-07-15-gatavoans-velo-maratonam.html
  64. +23 −0 _posts/2007-07-26-seb-maratona-4-posms.html
  65. +17 −0 _posts/2007-08-10-java-versijas.html
  66. +17 −0 _posts/2007-08-21-ie-un-png-.html
  67. +17 −0 _posts/2007-10-04-localedb-spraudnis-deskbar-apletam.html
  68. +15 −0 _posts/2008-03-17-superior-xp920-disc.html
  69. +21 −0 _posts/2008-04-19-pimp-.html
  70. +17 −0 _posts/2008-04-30--gada-pirmais-maratons.html
  71. +19 −0 _posts/2008-05-21-terminator.html
  72. +17 −0 _posts/2008-05-26-cyclinginfocouk.html
  73. +17 −0 _posts/2008-07-13-seb-mtb-maratons-kuldg.html
  74. +42 −0 _posts/2008-08-19-seb-mtb-maratons-2008-nosldzies.html
  75. +19 −0 _posts/2008-09-08-atvrt-koda-interneta-veikals.html
  76. +22 −0 _posts/2008-09-10-emerald-theme-downloader.html
  77. +19 −0 _posts/2008-09-14-tvu-diena.html
  78. +23 −0 _posts/2008-11-05-velorullis.html
  79. +28 −0 _posts/2008-11-28-ubuntu-suspend-un-hibernate-skaas-problmas.html
  80. +21 −0 _posts/2009-02-14-transalp-challenge---video.html
  81. +51 −0 _posts/2009-02-17-htc-magic.html
  82. +44 −0 _posts/2009-06-12-treniu-kalendrs---veloridelv.html
  83. +64 −0 _posts/2010-10-15-htc-desire-vs-iphone-3g.md
  84. +35 −0 _posts/2011-01-09-media-faili-no-tava-ubuntu-uz-tava-tv-izmantojot-mediatomb.md
  85. +16 −0 _posts/2011-02-18-pilnmness-perigejs.md
  86. +15 −0 _posts/2011-05-04-stipro-skrjiens-2011.md
  87. +21 −0 _posts/2011-06-11-lokala-latviesu-vardncas-aplikacija-linux-vide.md
  88. +20 −0 _posts/2011-06-12-latvieu-radio-uz-android.md
  89. +50 −0 _posts/2011-07-26-velotrisms-zviedrij.md
  90. +17 −0 _posts/2011-09-24-ignite100-newcastle.md
  91. +9 −0 arhivs.html
  92. +62 −0 assets/css/colorbox.css
  93. +300 −0 assets/css/global.css
  94. +58 −0 assets/css/pygments_pastie.css
  95. 0 assets/favicon.ico
  96. BIN assets/images/appengine-silver-120x30.gif
  97. BIN assets/images/colorbox/border.png
  98. BIN assets/images/colorbox/controls.png
  99. BIN assets/images/colorbox/internet_explorer/borderBottomCenter.png
  100. BIN assets/images/colorbox/internet_explorer/borderBottomLeft.png
  101. BIN assets/images/colorbox/internet_explorer/borderBottomRight.png
  102. BIN assets/images/colorbox/internet_explorer/borderMiddleLeft.png
  103. BIN assets/images/colorbox/internet_explorer/borderMiddleRight.png
  104. BIN assets/images/colorbox/internet_explorer/borderTopCenter.png
  105. BIN assets/images/colorbox/internet_explorer/borderTopLeft.png
  106. BIN assets/images/colorbox/internet_explorer/borderTopRight.png
  107. BIN assets/images/colorbox/loading.gif
  108. BIN assets/images/colorbox/loading_background.png
  109. BIN assets/images/colorbox/overlay.png
  110. BIN assets/images/dots.gif
  111. BIN assets/images/logo.png
  112. BIN assets/images/me_small.png
  113. BIN assets/images/menu.png
  114. BIN assets/images/pasts.png
  115. BIN assets/images/w3c-html5.gif
  116. +4 −0 assets/js/jquery.colorbox-min.js
  117. +148 −0 assets/js/jquery.timeago.js
  118. 0 assets/robots.txt
  119. +28 −0 atom.xml
  120. +27 −0 google_apps_importer.rb
  121. +92 −0 index.html
  122. +12 −0 lapas-karte.html
  123. +30 −0 latvianradio.md
  124. +23 −0 parmani.md
  125. +27 −0 programming.md
  126. +8 −0 sitemap.txt
  127. +20 −0 tagi.html
@@ -0,0 +1,10 @@
+_site/*
+_theme_packages/*
+
+Thumbs.db
+.DS_Store
+
+!.gitkeep
+
+.rbenv-version
+.rvmrc
No changes.
@@ -0,0 +1,10 @@
+---
+layout: page
+title: 404 - lapa nav atrasta
+enable_comments: false
+---
+{% include JB/setup %}
+
+<p>Tas ko Tu meklē šeit vairs nav jeb nekad nav bijis. Pārbaudi ievadīto adresi adresi jeb skaties <a href="/arhivs.html">rakstu arhīvā</a>
+ vai <a href="/lapas-karte.html">lapas kartē.</a>
+</p>
1 CNAME
@@ -0,0 +1 @@
+gacha.id.lv
@@ -0,0 +1 @@
+My web page http://gacha.id.lv using <http://jekyllbootstrap.com>
306 Rakefile
@@ -0,0 +1,306 @@
+require "rubygems"
+require 'rake'
+require 'yaml'
+require 'time'
+
+SOURCE = "."
+CONFIG = {
+ 'version' => "0.2.9",
+ 'themes' => File.join(SOURCE, "_includes", "themes"),
+ 'layouts' => File.join(SOURCE, "_layouts"),
+ 'posts' => File.join(SOURCE, "_posts"),
+ 'post_ext' => "md",
+ 'theme_package_version' => "0.1.0"
+}
+
+# Path configuration helper
+module JB
+ class Path
+ SOURCE = "."
+ Paths = {
+ :layouts => "_layouts",
+ :themes => "_includes/themes",
+ :theme_assets => "assets/themes",
+ :theme_packages => "_theme_packages",
+ :posts => "_posts"
+ }
+
+ def self.base
+ SOURCE
+ end
+
+ # build a path relative to configured path settings.
+ def self.build(path, opts = {})
+ opts[:root] ||= SOURCE
+ path = "#{opts[:root]}/#{Paths[path.to_sym]}/#{opts[:node]}".split("/")
+ path.compact!
+ File.__send__ :join, path
+ end
+
+ end #Path
+end #JB
+
+# Usage: rake post title="A Title" [date="2012-02-09"]
+desc "Begin a new post in #{CONFIG['posts']}"
+task :post do
+ abort("rake aborted: '#{CONFIG['posts']}' directory not found.") unless FileTest.directory?(CONFIG['posts'])
+ title = ENV["title"] || "new-post"
+ slug = title.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '')
+ begin
+ date = (ENV['date'] ? Time.parse(ENV['date']) : Time.now).strftime('%Y-%m-%d')
+ rescue Exception => e
+ puts "Error - date format must be YYYY-MM-DD, please check you typed it correctly!"
+ exit -1
+ end
+ filename = File.join(CONFIG['posts'], "#{date}-#{slug}.#{CONFIG['post_ext']}")
+ if File.exist?(filename)
+ abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ end
+
+ puts "Creating new post: #{filename}"
+ open(filename, 'w') do |post|
+ post.puts "---"
+ post.puts "layout: post"
+ post.puts "title: \"#{title.gsub(/-/,' ')}\""
+ post.puts "category: "
+ post.puts "tags: []"
+ post.puts "---"
+ post.puts "{% include JB/setup %}"
+ end
+end # task :post
+
+# Usage: rake page name="about.html"
+# You can also specify a sub-directory path.
+# If you don't specify a file extention we create an index.html at the path specified
+desc "Create a new page."
+task :page do
+ name = ENV["name"] || "new-page.md"
+ filename = File.join(SOURCE, "#{name}")
+ filename = File.join(filename, "index.html") if File.extname(filename) == ""
+ title = File.basename(filename, File.extname(filename)).gsub(/[\W\_]/, " ").gsub(/\b\w/){$&.upcase}
+ if File.exist?(filename)
+ abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ end
+
+ mkdir_p File.dirname(filename)
+ puts "Creating new page: #{filename}"
+ open(filename, 'w') do |post|
+ post.puts "---"
+ post.puts "layout: page"
+ post.puts "title: \"#{title}\""
+ post.puts "---"
+ post.puts "{% include JB/setup %}"
+ end
+end # task :page
+
+desc "Launch preview environment"
+task :preview do
+ system "jekyll --auto --server"
+end # task :preview
+
+# Public: Alias - Maintains backwards compatability for theme switching.
+task :switch_theme => "theme:switch"
+
+namespace :theme do
+
+ # Public: Switch from one theme to another for your blog.
+ #
+ # name - String, Required. name of the theme you want to switch to.
+ # The the theme must be installed into your JB framework.
+ #
+ # Examples
+ #
+ # rake theme:switch name="the-program"
+ #
+ # Returns Success/failure messages.
+ desc "Switch between Jekyll-bootstrap themes."
+ task :switch do
+ theme_name = ENV["name"].to_s
+ theme_path = File.join(CONFIG['themes'], theme_name)
+ settings_file = File.join(theme_path, "settings.yml")
+ non_layout_files = ["settings.yml"]
+
+ abort("rake aborted: name cannot be blank") if theme_name.empty?
+ abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
+ abort("rake aborted: '#{CONFIG['layouts']}' directory not found.") unless FileTest.directory?(CONFIG['layouts'])
+
+ Dir.glob("#{theme_path}/*") do |filename|
+ next if non_layout_files.include?(File.basename(filename).downcase)
+ puts "Generating '#{theme_name}' layout: #{File.basename(filename)}"
+
+ open(File.join(CONFIG['layouts'], File.basename(filename)), 'w') do |page|
+ if File.basename(filename, ".html").downcase == "default"
+ page.puts "---"
+ page.puts File.read(settings_file) if File.exist?(settings_file)
+ page.puts "---"
+ else
+ page.puts "---"
+ page.puts "layout: default"
+ page.puts "---"
+ end
+ page.puts "{% include JB/setup %}"
+ page.puts "{% include themes/#{theme_name}/#{File.basename(filename)} %}"
+ end
+ end
+
+ puts "=> Theme successfully switched!"
+ puts "=> Reload your web-page to check it out =)"
+ end # task :switch
+
+ # Public: Install a theme using the theme packager.
+ # Version 0.1.0 simple 1:1 file matching.
+ #
+ # git - String, Optional path to the git repository of the theme to be installed.
+ # name - String, Optional name of the theme you want to install.
+ # Passing name requires that the theme package already exist.
+ #
+ # Examples
+ #
+ # rake theme:install git="https://github.com/jekyllbootstrap/theme-twitter.git"
+ # rake theme:install name="cool-theme"
+ #
+ # Returns Success/failure messages.
+ desc "Install theme"
+ task :install do
+ if ENV["git"]
+ manifest = theme_from_git_url(ENV["git"])
+ name = manifest["name"]
+ else
+ name = ENV["name"].to_s.downcase
+ end
+
+ packaged_theme_path = JB::Path.build(:theme_packages, :node => name)
+
+ abort("rake aborted!
+ => ERROR: 'name' cannot be blank") if name.empty?
+ abort("rake aborted!
+ => ERROR: '#{packaged_theme_path}' directory not found.
+ => Installable themes can be added via git. You can find some here: http://github.com/jekyllbootstrap
+ => To download+install run: `rake theme:install git='[PUBLIC-CLONE-URL]'`
+ => example : rake theme:install git='git@github.com:jekyllbootstrap/theme-the-program.git'
+ ") unless FileTest.directory?(packaged_theme_path)
+
+ manifest = verify_manifest(packaged_theme_path)
+
+ # Get relative paths to packaged theme files
+ # Exclude directories as they'll be recursively created. Exclude meta-data files.
+ packaged_theme_files = []
+ FileUtils.cd(packaged_theme_path) {
+ Dir.glob("**/*.*") { |f|
+ next if ( FileTest.directory?(f) || f =~ /^(manifest|readme|packager)/i )
+ packaged_theme_files << f
+ }
+ }
+
+ # Mirror each file into the framework making sure to prompt if already exists.
+ packaged_theme_files.each do |filename|
+ file_install_path = File.join(JB::Path.base, filename)
+ if File.exist? file_install_path
+ next if ask("#{file_install_path} already exists. Do you want to overwrite?", ['y', 'n']) == 'n'
+ else
+ mkdir_p File.dirname(file_install_path)
+ cp_r File.join(packaged_theme_path, filename), file_install_path
+ end
+ end
+
+ puts "=> #{name} theme has been installed!"
+ puts "=> ---"
+ if ask("=> Want to switch themes now?", ['y', 'n']) == 'y'
+ system("rake switch_theme name='#{name}'")
+ end
+ end
+
+ # Public: Package a theme using the theme packager.
+ # The theme must be structured using valid JB API.
+ # In other words packaging is essentially the reverse of installing.
+ #
+ # name - String, Required name of the theme you want to package.
+ #
+ # Examples
+ #
+ # rake theme:package name="twitter"
+ #
+ # Returns Success/failure messages.
+ desc "Package theme"
+ task :package do
+ name = ENV["name"].to_s.downcase
+ theme_path = JB::Path.build(:themes, :node => name)
+ asset_path = JB::Path.build(:theme_assets, :node => name)
+
+ abort("rake aborted: name cannot be blank") if name.empty?
+ abort("rake aborted: '#{theme_path}' directory not found.") unless FileTest.directory?(theme_path)
+ abort("rake aborted: '#{asset_path}' directory not found.") unless FileTest.directory?(asset_path)
+
+ ## Mirror theme's template directory (_includes)
+ packaged_theme_path = JB::Path.build(:themes, :root => JB::Path.build(:theme_packages, :node => name))
+ mkdir_p packaged_theme_path
+ cp_r theme_path, packaged_theme_path
+
+ ## Mirror theme's asset directory
+ packaged_theme_assets_path = JB::Path.build(:theme_assets, :root => JB::Path.build(:theme_packages, :node => name))
+ mkdir_p packaged_theme_assets_path
+ cp_r asset_path, packaged_theme_assets_path
+
+ ## Log packager version
+ packager = {"packager" => {"version" => CONFIG["theme_package_version"].to_s } }
+ open(JB::Path.build(:theme_packages, :node => "#{name}/packager.yml"), "w") do |page|
+ page.puts packager.to_yaml
+ end
+
+ puts "=> '#{name}' theme is packaged and available at: #{JB::Path.build(:theme_packages, :node => name)}"
+ end
+
+end # end namespace :theme
+
+# Internal: Download and process a theme from a git url.
+# Notice we don't know the name of the theme until we look it up in the manifest.
+# So we'll have to change the folder name once we get the name.
+#
+# url - String, Required url to git repository.
+#
+# Returns theme manifest hash
+def theme_from_git_url(url)
+ tmp_path = JB::Path.build(:theme_packages, :node => "_tmp")
+ abort("rake aborted: system call to git clone failed") if !system("git clone #{url} #{tmp_path}")
+ manifest = verify_manifest(tmp_path)
+ new_path = JB::Path.build(:theme_packages, :node => manifest["name"])
+ if File.exist?(new_path) && ask("=> #{new_path} theme package already exists. Override?", ['y', 'n']) == 'n'
+ remove_dir(tmp_path)
+ abort("rake aborted: '#{manifest["name"]}' already exists as theme package.")
+ end
+
+ remove_dir(new_path) if File.exist?(new_path)
+ mv(tmp_path, new_path)
+ manifest
+end
+
+# Internal: Process theme package manifest file.
+#
+# theme_path - String, Required. File path to theme package.
+#
+# Returns theme manifest hash
+def verify_manifest(theme_path)
+ manifest_path = File.join(theme_path, "manifest.yml")
+ manifest_file = File.open( manifest_path )
+ abort("rake aborted: repo must contain valid manifest.yml") unless File.exist? manifest_file
+ manifest = YAML.load( manifest_file )
+ manifest_file.close
+ manifest
+end
+
+def ask(message, valid_options)
+ if valid_options
+ answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer)
+ else
+ answer = get_stdin(message)
+ end
+ answer
+end
+
+def get_stdin(message)
+ print message
+ STDIN.gets.chomp
+end
+
+#Load custom rake scripts
+Dir['_rake/*.rake'].each { |r| load r }
@@ -0,0 +1,22 @@
+---
+layout: page
+title: Categories
+header: Posts By Category
+group: navigation
+---
+{% include JB/setup %}
+
+<ul class="tag_box inline">
+ {% assign categories_list = site.categories %}
+ {% include JB/categories_list %}
+</ul>
+
+
+{% for category in site.categories %}
+ <h2 id="{{ category[0] }}-ref">{{ category[0] | join: "/" }}</h2>
+ <ul>
+ {% assign pages_list = category[1] %}
+ {% include JB/pages_list %}
+ </ul>
+{% endfor %}
+
Oops, something went wrong.

0 comments on commit dbed5e0

Please sign in to comment.