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
#!/usr/local/bin/ruby | |
require "curses" | |
begin | |
Curses.init_screen # bring it | |
line = nil | |
win = Curses::Window.new(5, 50, 10, 10) | |
wout = Curses::Window.new(5, 50, 20, 10) |
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
# ./Gemfile | |
# $ bundle | |
source "https://rubygems.org" | |
gem "activemodel" | |
############################################### | |
# foo.rb | |
# $ bundle exec ruby foo.rb |
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
Suggestions for discovering new stuff, active living, de-Google/Amazon/Facebook'ing my life | |
What to order at a restaurant? | |
- The signature item (if the restaurants signature item is crap...run) | |
- Chef’s or wait-staffs favorite | |
- The last thing the previous table ordered | |
- Ask for the freshest ingredients | |
How to choose a restaurant? |
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
Are you interested in cultivating a Centro engineering culture? | |
1) How does culture drive performance? | |
2) What is culture worth? | |
3) What processes in an organization affect culture? | |
What accomplishment(s) are you most proud of and why? (at Centro) | |
What accomplishment(s) are you most proud of and why? (outside Centro) | |
Of the teams you have worked on in your career: | |
- What has motivated you to give everything you have? Do you have that same motivation here? If not, what is lacking? |
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
https://developer.mozilla.org/en-US/docs/Web/API/Console | |
# 2 ways to access | |
window.console.log("Hello World") | |
console.log("Yo, sup world!") | |
# Four different levels of output | |
console.log("Hello World") // console.debug is it's alias |
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
# Margins of Safety | |
# 30% > $ 10B | |
# 50% - 30% for $1-10B Market Cap | |
# > 50% for < $1B | |
# Owner's Earnings | |
# Read more: http://www.oldschoolvalue.com/blog/valuation-methods/working-capital-free-cash-flow-fcf/#ixzz3O1Egljwo | |
# Owner earnings = Net income + depreciation & amortization +/- one-time items +/- changes in working capital - capital expenditures | |
def owner_earnings # Better than free cash flow |
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
count = (ARGV.first || 3).to_i | |
puts "Creating #{count} threads" | |
threads = count.times.map do |n| | |
num = n + 1 | |
puts "Creating thread #{num}" | |
t = Thread.new do | |
loop do | |
puts "Thread #{num}" | |
sleep rand(2..5) | |
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
t = Thread.new do | |
loop do | |
puts "Thread 1" | |
sleep rand(3) | |
end | |
end | |
t1 = Thread.new do | |
loop do | |
puts "\tThread 2" |
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
echo "Hello World" | |
echo "Hello\nWorld" | |
echo "\nLoad another file into context" | |
. load_vars | |
echo "Loaded \$VAR from . load_vars and its value is: $VAR" | |
echo "Script is also environmentally conscious: \$HOME = ${HOME}" |
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
CPU | |
Control Unit | |
- Portillos Manager | |
- Tells input, output, memory and alu how to respond to instruction | |
- Here are those binary logic gates that we know and love | |
- When we say a computer is 1HZ it means it can execute a single instuction 1 | |
time per second. A 2.4 Ghz machine is 2.4B instructions per unit. Times 4 | |
cores!! | |
Algorithm/Logic Unit | |
- Algorithmic: add, substract, multiple, divide |