Categories
Fixing Stuff Samuel

Bathroom Remodel Project Notes

We recently did a bathroom remodel on a rental unit and I wanted to keep notes for myself to remember what went well in the process and what materials we used.

Materials List:

screws

drywall

backer-board

img_20160923_175011471

img_20160923_175022553

*note this is not a full materials list, just some of the items I deemed important during the process.

Cost Estimates:

Framing: 900$. Add load bearing wall to shore up 2nd floor bathroom, sister new wood beams to old notched beams, run helper boards (2X4’s) in each floor joist so there is a new, much more level support to lay the sub-floor on. Frame in the entire new bathroom, lay the 1/2 inch plywood subfloor.

Plumbing: 1,400$. Cut out old cast iron main stack + cut out old shower line and old sink link. Main stack replacement with PVC, shower and sink replacement with pvc, new pex water lines run from basement up to first floor, copper stub outs for sink, toilet, and shower, toilet flange put in place 2 inches above the subfloor to leave space for backerboard and tiles.

Electrical: KNOB & TUBE WIRE Remove and replace the existing knob & tube wire with romex wire in the dining room that feeds the ceiling fixture, switch and an outlet in the interior walls. 2ND FLOOR Replace the knob & tube wire to the 3way switches and the light fixture for the 2nd floor step light.
Replace the knob & tube wire from the light switch to the ceiling fixture in the two bedrooms. Install ceiling fan rated boxes for the two bedrooms. 2ND FLOOR HALL BATH Supply and install one 110cfm combo exhaust fan/light controlled by a s/p switch and 30min timer. Install one vanity light fixture controlled by a s/p switch. Install one GFI outlet. Install new circuits from the electric panel for the new work. SMOKE DETECTOR Install one arc fault breaker. Install one combo smoke/carbon detector in the basement. Install one smoke detector on the 1st floor. Install two smoke detectors and one combo smoke/carbon detector
on the 2nd floor. Electrical & Lighting 2,485.00

Finish Work: Install drywall on dining room ceiling, tape sand and smooth, prime, texture, and paint. INstall custom book sshelf with a face frame for removable access to plumbing and electrical work. Prime and paint bookshelf. Install 3&1/4th inche crown molding in dining room. Caulk and fill nail holes, paint to math trim. Install 1/2 inch drywall on walls, tape all joints, sand and smooth. Patch linen closet and ceiling / custom texture ceiling. Prime and paint walls and ceiling, 2 coats. Install 1/2 cement board on floor for tile, install customer supplied tile on floor and shower walls. Grout tile and wipe clean. Replace window with premium Cambridge windows, install composite jambs and casings around window and caulk. Make and install custom door casings and 4&1/4 inch baseboards. Install vanity wall cleats and new melamine shelves in line closet. Total cost 6,325.00$

Photos:

Categories
Laravel Samuel

clean seeding laravel DB

in the .env file set clean seed to true:

IS_CLEAN_SEED=true

then migrate with seed:

php artisan migrate:refresh --seed

The clean seeds are defined in the DatabaseSeeder class. The MVC repo has examples.

Categories
mySQL

mySQL Lesson 2

select *
from orders
order by id
limit 100;

select *
from order_items
order by id
limit 100;

Categories
mySQL

mySQL lesson 1

select a table in the db and show info from this table:

SELECT * FROM celebs;

create DB table:

CREATE TABLE celebs (id INTEGER, name TEXT, age INTEGER);

insert info into DB:

INSERT INTO celebs (id, name, age) VALUES (1, 'Justin Bieber', 21);

INSERT INTO celebs (id, name, age) VALUES (2, 'Beyonce Knowles', 33);

INSERT INTO celebs (id, name, age) VALUES (3, 'Jeremy Lin', 26);

INSERT INTO celebs (id, name, age) VALUES (4, 'Taylor Swift', 26);

update a row in the DB

UPDATE celebs
SET age = 22
WHERE id = 1;

SELECT * FROM celebs;

Add a new column to the table

ALTER TABLE celebs ADD COLUMN twitter_handle TEXT;

SELECT * FROM celebs;

add information to this new column

UPDATE celebs
SET twitter_handle = '@taylorswift13'
WHERE id = 4;

SELECT * FROM celebs;

delete rows that have a NULL value

UPDATE celebs
SET twitter_handle = '@taylorswift13'
WHERE id = 4;
DELETE FROM celebs WHERE twitter_handle IS NULL;

SELECT * FROM celebs;

Categories
php unit

Unit 8 Functions Part II

1.) Functions refresher

print the number of characters in your name:

$length = strlen("Samuel");
echo $length;

2.) Functions Syntax

typical structure of a function:

function name(parameters) {
statement;
}


function helloWorld() {
echo "Hello world!";
}


3.) First Function


function displayName() {
echo "Samuel";
}
displayName();

5.) Returning Values

Instead of printing something to the screen, what if you want to make it the value that the function outputs so it can be used elsewhere in your program? In PHP, the return keyword does just that. It returns to us a value that we can work with. The difference between this and echo or print is that it doesn’t actually display the value.


function returnName() {
return "samuel";
}

6.) Parameters and Arguments

Functions wouldn’t be nearly as useful if they weren’t able to take in some input. This is where parameters or arguments come in. These are the variables or inputs that a function uses to perform calculations.

$name = "Samuel";
function greetings($name) {
echo "Greetings," .$name. "!";
}

greetings($name);

7.) Practice Defining multiple parameters


$name = "Samuel";
$age = "28";

function aboutMe($name, $age){
echo "Hello! My name is " .$name. " and I am " .$age. " years old";

}

aboutMe($name, $age);

Categories
php unit

Unit 7 Functions

This is just useful notes for my own later use. Spoiler alert if you don’t want the answers to these lessons than don’t read on any farther.

Lesson 7:

1.) Introducing Functions

strlen() string function. You pass this a string or a varialbe containing a string and it will return the number of characters in the string. Example:

$length = strlen("Samuel");
print $length;

2.) String Functions

substr() You pass this function the string you want to get a subsctring of, the character in your string to start at, and how many characters you want after your starting point. For example:

print the first 3 letters of my name:

$myname = "Samuel Bell";
$partial = substr($myname,0,3);
print $partial;

print my name in uppercase:

$uppercase = strtoupper($myname);
print $uppercase;

print my name in lowercase:

$lowercase = strtolower($uppercase);
print $lowercase;