Skip to content

Instantly share code, notes, and snippets.

Ted Price pricees

View GitHub Profile
@pricees
pricees / pryghtning-talk.md
Last active Dec 4, 2018
Pry-ghtning Talk
View pryghtning-talk.md

Dunder Mifflin => 2nd previous value

123
877
_ + __
=> 1000

HistoReplay

View git-lt.md

#Anatomy of a Git Diff

This is a hunk, not a chunk.

diff --git a/lorem b/lorem
index 5da0182..4fcdc38 100644
--- a/lorem
+++ b/lorem
@@ -16,4 +16,24 @@ Nullam congue nunc sollicitudin, fermentum urna vel, tempus lorem. Morbi molesti
View git-lt
#Anatomy of a Git Diff
This is a **hunk**, not a *chunk*.
```
diff --git a/lorem b/lorem
index 5da0182..4fcdc38 100644
--- a/lorem
+++ b/lorem
@@ -16,4 +16,24 @@ Nullam congue nunc sollicitudin, fermentum urna vel, tempus lorem. Morbi molesti
View keybase.md

Keybase proof

I hereby claim:

  • I am pricees on github.
  • I am pricees (https://keybase.io/pricees) on keybase.
  • I have a public key ASAWbRPQvm0-rtCndpOV97jHD5YBztE_Ejd22wytR2JMxgo

To claim this, I am signing this object:

@pricees
pricees / activemodel_callbacks.rb
Created Jan 9, 2018
Using ActiveModel::Callbacks
View activemodel_callbacks.rb
# ./Gemfile
# $ bundle
source "https://rubygems.org"
gem "activemodel"
###############################################
# foo.rb
# $ bundle exec ruby foo.rb
@pricees
pricees / active-living-and-discovery.txt
Last active Jan 3, 2018
Active living and discovery
View active-living-and-discovery.txt
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?
@pricees
pricees / centro-culture-questionnaire
Last active Jul 28, 2017
Centro Culture Questionnaire
View centro-culture-questionnaire
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?
View gist:291233ac937f6e7cfea4a3bda7d47f20
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
View threads_for_mac.rb
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
@pricees
pricees / threads.rb
Last active Apr 25, 2017
Show Ruby Native Threads
View threads.rb
t = Thread.new do
loop do
puts "Thread 1"
sleep rand(3)
end
end
t1 = Thread.new do
loop do
puts "\tThread 2"
You can’t perform that action at this time.