- http://www.ted.com/talks/max_little_a_test_for_parkinson_s_with_a_phone_call.html
- http://www.ted.com/talks/hannah_fry_is_life_really_that_complex.html
- http://www.ted.com/talks/eric_berlow_how_complexity_leads_to_simplicity.html
- http://www.ted.com/talks/lang/en/simon_sinek_how_great_leaders_inspire_action.html
- http://www.ted.com/talks/david_logan_on_tribal_leadership.html
- http://www.ted.com/talks/tristram_stuart_the_global_food_waste_scandal.html
- http://ed.ted.com/lessons/how-sugar-affects-the-brain-nicole-avena#watch
- http://www.ted.com/talks/ric_elias.html
- http://www.ted.com/talks/russell_foster_why_do_we_sleep.html
- http://www.ted.com/talks/yves_morieux_as_work_gets_more_complex_6_rules_to_simplify.html
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 'net/http' | |
require 'uri' | |
require 'json' | |
def send_operation() | |
data = { | |
customer_count: { | |
count: "45", | |
datetime: "2007-09-01T21:30:04.000+04:00", | |
} |
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 'digest/md5' | |
hash = {} | |
dirname = "files" | |
Dir.glob("#{dirname}/**/*", File::FNM_DOTMATCH).each do |filename| | |
next if File.directory?(filename) | |
# puts 'Checking ' + filename | |
key = Digest::MD5.hexdigest(IO.read(filename)).to_sym |
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
RSpec::Matchers.define :terminate do |code| | |
actual = nil | |
def supports_block_expectations? | |
true | |
end | |
match do |block| | |
begin | |
block.call |
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(){ | |
function drawLessonsCount(count) { | |
$(".topbar-nav-main").append("<li style='display: block; color: #fff; padding: 8px 15px;'>Осталось уроков: " + count + "</li>"); | |
} | |
function countLessons() { | |
var count = 0; | |
$(".lessons-left").each(function(index, element) { | |
var text = $(element).text(); |
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
#ruby | |
require "rubygems" | |
require "net/http" | |
require 'nokogiri' | |
#API | |
PARAMS = %w(title website description) | |
API_KEY = "YOUR KEY" | |
LOCATION = "moscow" |
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 Module | |
def fields_callbacks(fields) | |
fields.each do |field, value| | |
class_eval do | |
alias :"old_#{field}=" :"#{field}=" | |
define_method("#{field}=") do |v| | |
value.each { |method| send(method) } | |
send("old_#{field}=", v) | |
end | |
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
source 'http://rubygems.org' | |
gem 'sinatra' | |
gem 'haml' |
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 Array | |
def my_own_inject(proc) | |
temp = 0 | |
self.each do |e| | |
temp = proc.call(temp, e) | |
end | |
temp | |
end | |
end |