PARAGRAPH starts here.
Then continues on for a bit.
Lessons Steve Jobs wanted to pass on. | |
Written right before he died. | |
In his own words: | |
1. ON BUILDING A REAL COMPANY: | |
I hate it when people call themselves “entrepreneurs” when what they’re really trying to do is launch a startup and then sell or go public, so they can cash in and move on. |
# Edit and rename this file and then place it in /etc/wyzecam-to-rtmp | |
WYZE_EMAIL="[email protected]" | |
WYZE_PASSWORD="wyzepasshere" | |
WYZE_CAMERA_NAME="Doorbell" | |
RTMP_URL="rtmp://127.0.0.1/live/doorbell" |
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install |
;; helper functions | |
(defun kb/project-dir () | |
"returns the current project's root path" | |
(let* ((pr (project-current t)) | |
(pr-dir (project-root pr))) | |
pr-dir)) | |
(defun kb/project-concat (path) | |
"appends provided path onto the current project's root path" |
# https://guides.rubyonrails.org/active_record_callbacks.html#halting-execution | |
class Org < ApplicationRecord | |
before_destroy do | |
throw :abort unless no_user? | |
end | |
end |
/* | |
Solar system objects | |
Adapted from: http://en.wikipedia.org/wiki/List_of_Solar_System_objects_by_size | |
Collected by: https://www.khanacademy.org/profile/patrick809/programs | |
*/ | |
CREATE TABLE solar_system_objects( | |
body TEXT | |
, mean_radius NUMERIC /* km */ | |
, mean_radius_rel NUMERIC /* relative to earth */ | |
, volume NUMERIC /* 10^9 km^3 */ |
/* | |
Sales from an online furniture store | |
Collected by: https://www.khanacademy.org/profile/charlesb2000/ | |
*/ | |
CREATE TABLE sales( | |
ID INTEGER NOT NULL PRIMARY KEY | |
, transaction_date TEXT | |
, product TEXT | |
, price INTEGER | |
, payment_type TEXT |
def counts(str) | |
str.chars.inject([]) do |memo, e| | |
if memo.last && memo.last[0].eql?(e) | |
memo.last[1] += 1 | |
else | |
memo << [e, 1] | |
end | |
memo | |
end |
class Test | |
def run | |
puts ">>> starting test run: #{self.class.name}" | |
setup | |
the_test_methods.each do |test_method| | |
puts "running #{self.class.name}##{test_method}" | |
send(test_method) | |
end | |
end |