Skip to content

Instantly share code, notes, and snippets.

View lenart's full-sized avatar
🎯

Lenart Rudel lenart

🎯
  • Ljubljana, Slovenia
View GitHub Profile
@lenart
lenart / deploy.rb
Created September 25, 2013 18:44
Capistrano tasks to use with figaro gem.
namespace :figaro do
desc "SCP transfer figaro configuration to the shared folder"
task :setup do
transfer :up, "config/application.yml", "#{shared_path}/application.yml", via: :scp
end
desc "Symlink application.yml to the release path"
task :symlink do
run "ln -sf #{shared_path}/application.yml #{latest_release}/config/application.yml"
end
@lenart
lenart / index.html.haml
Created September 24, 2013 20:01
Rails 3.x I18n pluralization for slovene language
# app/views/users/index.html.haml
%h1 Uporabniki
- # 1 uporabnik
= t(:user, count: 1)
- # 2 uporabnika
= t(:user, count: 2)
@lenart
lenart / user-photo.php
Created June 12, 2011 09:53
Make User Photo use a single profile picture accross wordpress network
<?php
/*
Plugin Name: User Photo
Plugin URI: http://wordpress.org/extend/plugins/user-photo/
Description: Allows users to associate photos with their accounts by accessing their "Your Profile" page. Uploaded images are resized to fit the dimensions specified on the options page; a thumbnail image is also generated. New template tags introduced are: <code>userphoto_the_author_photo</code>, <code>userphoto_the_author_thumbnail</code>, <code>userphoto_comment_author_photo</code>, and <code>userphoto_comment_author_thumbnail</code>. Uploaded images may be moderated by administrators.
Version: 0.9.5.1
Author: <a href="http://weston.ruter.net/">Weston Ruter</a>
Original code by Weston Ruter <http://weston.ruter.net> at Shepherd Interactive <http://shepherd-interactive.com>.
Continued development and maintenance by Dave Wagner (cptnwinky) <http://dev.dave-wagner.com/>