Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User < ActiveRecord::Base | |
has_many :tasks | |
#common attributes and behavior for managers and workers | |
end | |
class Manager < User | |
#special manager's attributes and behavior | |
end | |
class Worker < User |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Given a time ordered list of pageviews ("events"), | |
# determine how many "visits" each user had, | |
# how long each visit lasted and how many page views occurred during each visit. | |
# A visit ends when the user has not had another page view for 1 hour, | |
# a new pageview after 1 hours starts a new visit (the time between visits is 1 hour). | |
require 'enumerator' | |
class Array | |
def to_event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require './user.rb' | |
def mainmenu | |
puts 'select an option please | |
1.- new user | |
2.- delete user | |
3.- consult user | |
4.- exit | |
type a number: ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= link_to 'New brand', '#new-brand-link', {:id => "new-brand-link"} %> | |
<div id="new-brand-form" title="Create new brand"> | |
<%= form_for [:admin, @brand], :remote => true do |form| %> | |
<%= form.label :name %> | |
<%= form.text_field :name %><br /> | |
<%= form.submit 'Save' %><br /> | |
<% end %> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function updateShadowColorValues(value){ | |
var eye_color = "none"; | |
switch (true) // << compare true with case value | |
{ | |
case (value == 0): | |
eye_color = "cero [" + value + "]"; | |
break; | |
case (value > 0 && value < 21): | |
eye_color = "white [" + value + "]"; | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DeviseUser < ActiveRecord::Base | |
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable | |
attr_accessible :email, :name, :password, :password_confirmation, :remember_me | |
has_many :posts, :as => :authorizable | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Use the correct keys (fubar) | |
nnoremap <Left> :echoe "Use h noob"<CR> | |
nnoremap <Right> :echoe "Use l noob"<CR> | |
nnoremap <Up> :echoe "Use k noob"<CR> | |
nnoremap <Down> :echoe "Use j noob"<CR> |
sudo vi /etc/default/grub # enter password when needed
change line
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”
into
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for more info: https://gist.github.com/1120938 |
OlderNewer