sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev
sudo apt-get install git-core
A po instalacii nastavit GIT:
navigator.geolocation.getCurrentPosition(function(position){ alert(position.coords.latitude + ", " + position.coords.longitude) }); |
Syncin.LoginController = Ember.Controller.extend({ | |
login: function() { | |
var data = { | |
username: this.get('username'), | |
password: this.get('password') | |
} | |
var self = this; | |
self.set('errorMessage', null); |
# encoding: utf-8 | |
categories = [ | |
'Ruby on Rails', | |
'Základy HTML', | |
'Dizajn pomocou CSS', | |
'Javascript a jQuery' | |
] | |
categories.each do |name| | |
Category.where(:name => name).first_or_create! |
class Ability | |
include CanCan::Ability | |
def initialize(user) | |
alias_action [:index, :show, :new, :create, :edit, :update, :destroy, :finalize], :to => :manage_crud | |
alias_action [:update_state], :to => :manage_status | |
user ||= User.new # guest user (not logged in) |
Starts working at 7am at Job A | |
Starts travelling at 8am from Job A | |
Starts working at 9am at Job B | |
Finished for the day at 3pm | |
| datetime | clock_type_id | job_id | | |
+----------+---------------+--------+ | |
7am 1 1 |
$ brew install mysql | |
==> Installing mysql dependency: cmake | |
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-2.8.7-bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring cmake-2.8.7.bottle.tar.gz | |
Warning: m4 macros were installed to "share/aclocal". | |
Homebrew does not append "/usr/local/share/aclocal" | |
to "/usr/share/aclocal/dirlist". If an autoconf script you use | |
requires these m4 macros, you'll need to add this path manually. | |
==> Summary |
# potrebujeme uzivatela v pravidelnych intervaloch udrziavat "pri zivote" | |
# musime mu teda niekde aktualizovat cas poslednej aktivity | |
# pomocou before filtra to docielime pri kazdom prekliku aplikaciou | |
# umiestnit do kazdeho controlleru, kde potrebujeme | |
before_filter :do_last_act | |
# application.rb |