# change mirror to ubuntu.osuosl.org first
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
| public interface IRepository<T> | |
| { | |
| IEnumerable<T> GetAll(); | |
| T GetByID(int id); | |
| T GetByID(Guid key); | |
| void Save(T entity); | |
| void Delete(T entity); | |
| } | |
| public class Repository<T> : IRepository<T> |
| # To use ActiveModel has_secure_password | |
| gem 'bcrypt-ruby', '~> 3.0.0' |
| $(document).ready(function(){ | |
| if(location.pathname != "/"){ | |
| $('.nav li a[href^="/' + location.pathname.split("/")[1] + '"]').parent().addClass('active'); | |
| } | |
| else | |
| $('.nav li a:eq(0)').parent().addClass('active'); | |
| }); |
| /* Requirements install git and curl */ | |
| /* installing rbenv */ | |
| curl https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash | |
| /* add this instead of generated stuff "PREPEND" the echo wordings to ~/.profile */ | |
| echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile | |
| echo 'eval "$(rbenv init -)"' >> ~/.profile |
| #Junk Files | |
| *.DS_Store | |
| [Tt]humbs.db | |
| #Visual Studio Files | |
| [Oo]bj | |
| [Bb]in | |
| [Dd]ebug | |
| [Bb]uild/ | |
| *.user |
| ==Configuration== | |
| Ubuntu 12.04 LTS, precise | |
| ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux] | |
| Rails 3.2.13 | |
| --Prerequisites | |
| ***I have a Vagrant for my development environment (avoid this, this is transparent for you...) |
| When starting a project that includes refinerycms-blog: | |
| $ rake refinery:override view=refinery/pages/* | |
| $ rake refinery:override view=layouts/* | |
| $ rake refinery:override view=refinery/blog/shared/* | |
| $ rake refinery:override view=refinery/blog/posts/* | |
| $ rake refinery:override view=refinery/* | |
| $ rake refinery:override controller=refinery/blog/* | |
| $ rake refinery:override controller=refinery/* |
| #disqus_thread | |
| :javascript | |
| // put the short name you signed up with here | |
| var disqus_shortname = 'example'; | |
| var disqus_developer = #{ Rails.env == "production" ? '0' : '1' }; | |
| var disqus_title = "#{ title }"; | |
| var disqus_url = "#{ request.url }"; | |
| var disqus_identifier = "#{ request.fullpath }"; | |
| (function() { | |
| var dsq = document.createElement('script'); |
| # capitalize each word of a string | |
| 'some string'.split(' ').map {|w| w.capitalize }.join(' ') |