Skip to content

Instantly share code, notes, and snippets.

Hrvoje Šimić shime

Block or report user

Report or block shime

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View četvrti_zadatak.rb
### Ispišite sve brojeve od 1 do 100, svaki u svom redu
### Ispišite brojeve od 17 do 32 u jednom redu, odvojite ih zarezom
### Ispišite random brojeve od 50 do 110 u jednom redu, odvojite ih zarezom
View peti_zadatak.rb
### a) Ispišite sve brojeve od 1 do 1000 koji su djeljivi sa 13 ili 7
### b) Napravite novi rječnik koji će sadržavati dva ključa.
### Ključevi: 15, 7
###
### Pod ključem "15" u ovom hashu moraju biti svi brojevi
### od 1 do 1000 djeljivi sa 15
### Pod ključem "7" u ovom hashu moraju biti svi brojevi
### od 1 do 1000 djeljivi sa 7
View šesti_zadatak.rb
### Napišite metodu koja prima string i vraća broj pojavljivanja slova a u tom stringu
### Napišite metodu koja prima string a ispisuje ga unazad
View prijemni.rb
### 1. Create user class by implementing
### a. properties
### i. user_id
### ii. username
### iii. password
### iv. email
### b. methods
### i. greet (learn user to say "Hi! My name is <name>, nice to meet you."
###
@shime
shime / custom_sender_example.rb
Created Feb 28, 2012
conditioning airbrake at runtime
View custom_sender_example.rb
class CustomSender < Airbrake::Sender
alias_method :orig_send, :send_to_airbrake
def send_to_airbrake(data)
return if Random.new.rand(10..20).odd?
orig_send(data)
end
end
Airbrake.sender = CustomSender.new(Airbrake.configuration)
View test_airbrake.rb
(1..100).select { Airbrake.notify(:error_class => "Testing success rate",:error_message => "Error Message") }.length / 100.0
View rppp_interview.markdown

#RPPP INTERVJU

informatizacija vlastitog poslovanja - radimo projekte na zavodu

projekti: znanstveni, nastavni, međunarodni (fp6,fp7) - o rezultatima projekata pišu se neki radovi, evidentiraju se podaci

kad se napravi projekt, evidentira se rad i autori

različite vrste radova: studija, elaborat, članak u časopisu, diplomski, doktorska dizertacija, poglavlje u knjizi

@shime
shime / Gemfile
Created Apr 2, 2012
Rails Lightweight Stack. Most of this is detailed on Crafting Rails Applications - http://pragprog.com/book/jvrails/crafting-rails-applications
View Gemfile
source :rubygems
# We are not loading Active Record, nor Active Resources etc.
# We can do this in any app by simply replacing the rails gem
# by the parts we want to use.
gem "actionpack", "~> 3.2"
gem "railties", "~> 3.2"
gem "tzinfo"
# Let's use thin
@shime
shime / example.sh
Created Apr 3, 2012
Using a local clone of rails for development
View example.sh
$ ruby /path/to/rails/railties/bin/rails new myapp --dev
@shime
shime / airbrake.rb
Created Apr 4, 2012
[Airbrake] little hack to receive email on every occurrence of exception
View airbrake.rb
Airbrake.configure do |config|
config.api_key = '092f2e6780f7c9117353d28dbe8486a3'
config.development_environments = []
end
module Airbrake
module Customization
def self.included(base) #:nodoc:
base.send(:alias_method_chain,:initialize,:customization)
end
You can’t perform that action at this time.