This file contains hidden or 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 Person | |
include UsersAdditions | |
end | |
module UsersAdditions | |
def full_name | |
"#{first_name} #{last_name}" | |
end | |
end |
This file contains hidden or 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
# test.csv | |
# | |
# A,B,"C D" | |
# 1,2,"3 4" | |
# 5,6,7 | |
import csv | |
ifile = open('test.csv', "rb") | |
reader = csv.reader(ifile) |
This file contains hidden or 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
diff --git a/Guardfile b/Guardfile | |
index 8382d1c..5009879 100644 | |
--- a/Guardfile | |
+++ b/Guardfile | |
@@ -9,16 +9,10 @@ guard 'spork', :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do | |
watch('Gemfile') | |
watch('Gemfile.lock') | |
watch('spec/spec_helper.rb') { :rspec } | |
- watch(%r{features/support/}) { :cucumber } | |
- watch(%r{^app/models/.+\.rb$}) |
This file contains hidden or 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 "open-uri" | |
require "nokogiri" | |
require "optparse" | |
BASE_URI = "http://www.spareroom.co.uk/flatshare/flatshare_detail.pl?flatshare_id=" | |
options = {} | |
optparse = OptionParser.new do |opts| | |
opts.banner = "Usage: #$0 -i ROOMID" |
This file contains hidden or 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
Be An Executioner | |
It's so funny when I hear people being so protective of ideas. (People who want me to sign an nda to tell me the simplest idea.) | |
To me, ideas are worth nothing unless executed. They are just a multiplier. Execution is worth millions. | |
Explanation: | |
Awful idea = -1 | |
Weak idea = 1 |
This file contains hidden or 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
[user] | |
name = Tadej Murovec | |
email = [email protected] | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
ui = true |
This file contains hidden or 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
Options +FollowSymlinks | |
Options All -Indexes | |
RewriteEngine on | |
RewriteCond %{REQUEST_URI} !^/(robots\.txt|favicon\.ico|sitemap\.xml)$ | |
RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] | |
RewriteRule ^(.*)$ http://www.domain/$1 [R=301,L] | |
RewriteCond %{REQUEST_fileNAME} !-d | |
RewriteCond %{REQUEST_fileNAME} !-f | |
RewriteRule ^(([^/]+/)*[^./]+)/?$ /$1.html [L] |
This file contains hidden or 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
# added some useful methods to Array class | |
class Array | |
def sum | |
self.inject{ |sum,x| sum ? sum + x : x } | |
end | |
end | |
# counts conflicts at current seat order | |
def conflicts(order, hates) | |
conflict = 0 | |
order.each do |table| |
This file contains hidden or 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
# added some useful methods to Array class | |
class Array | |
def sum | |
self.inject{ |sum,x| sum ? sum + x : x } | |
end | |
end | |
# counts conflicts at current seat order | |
def conflicts(order, hates) | |
conflict = 0 | |
order.each do |table| |
This file contains hidden or 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
/* Userscript, fluid, finance.si */ | |
* { border: 0 none !important; border-spacing: 0px 0px !important; } | |
* body { background-color: rgb(254, 237, 228) !important; line-height: 1.5em !important; } | |
ul{ list-style: none !important;} | |
#siteHeader,#miniprint{ display: none !important; } | |
.siteContentPad{ height: 1em !important; display: none; } | |
.right, .footer, .article-source, .ad, .sitemap, .sub-column, .pr-title, .art-rubrika{ display: none; } | |
tr.title{ display: none; } | |
#article-source{ display: none; } | |
#maincolumn{ width: 100% !important; } |
NewerOlder