Skip to content

Instantly share code, notes, and snippets.

View pricees's full-sized avatar

Ted Price pricees

View GitHub Profile
@pricees
pricees / pryghtning-talk.md
Last active December 4, 2018 15:58
Pry-ghtning Talk

Dunder Mifflin => 2nd previous value

123
877
_ + __
=> 1000

HistoReplay

#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
@pricees
pricees / git-lt
Created September 25, 2018 16:54
#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

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 January 9, 2018 20:18
Using ActiveModel::Callbacks
# ./Gemfile
# $ bundle
source "https://rubygems.org"
gem "activemodel"
###############################################
# foo.rb
# $ bundle exec ruby foo.rb
@pricees
pricees / active-living-and-discovery.txt
Last active January 3, 2018 15:10
Active living and discovery
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 July 28, 2017 14:53
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?
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
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 April 25, 2017 05:51
Show Ruby Native Threads
t = Thread.new do
loop do
puts "Thread 1"
sleep rand(3)
end
end
t1 = Thread.new do
loop do
puts "\tThread 2"