Categories
Fixing Stuff Laravel

Link to PDF document in laravel 5 blade file

this is a pretty simple issue but just wanted to jot down this note in case anyone out there is trying to link to an image or pdf asset in their laravel blade file and its not working. The process to do this looks like:

a href="{{ asset('/assets/folder-name/filename') }}" target="_blank"> Link Name

so for example if you had a PDF that you wanted to link to it would look like:

a href="{{ asset('/assets/folder-name/file-name.pdf') }}" target="_blank"> File Name

Categories
Fixing Stuff Julia

How to stop a Brinks/ADT alarm from beeping…even when it’s not active

So, for the past several weeks my landlord has said he would call about fixing the unused Brinks alarm system in our apartment. We’ve got two keypads and for the most part they were an eyesore when we moved in but otherwise worthless. Until they started beeping. Once every 12-18 hours long, loud beeps would occur until we pressed the cancel button on the keypad; in the middle of the night, as I was getting home from work and when I was home alone in the shower and thought maybe I was under attack…

Since my landlord was not moving fast enough (though apologetic) I decided to take matters into my own hands. In case anyone is running into the same issue, here’s how to disarm a disconnected alarm that won’t shut up!

1. Get a Phillips screw driver.

2. Locate the power box for the alarm. For me this was in a closet in my entryway. It looks like this:

image

3. Use the screwdriver to open the box, and once opened locate the battery. Pull the black cord off the battery (mine was pretty stuck, don’t be afraid to yank on it). Here’s what it looks like with the black cord unplugged from the top of the battery:

image

4. Look down from the box, or in my case if a hole with wires is drilled into the wall then look on the other side of the wall. You should see something that looks like a small white speaker plugged into an outlet. It’s screwed in, so grab that screw driver and unscrew it and the 4 wires on its backside once it’s free from the outlet/wall. Here’s what the box looks like.:

image

5. Push any wires into the wall, close up the power box and pour yourself a drink as you celebrate the lights on your alarm keypad going dead. No more beeping!! Your partner and nighbors will thank you.

And I thought I wasn’t handy. Boo-ya. Next up, trying not to die as I get a step stool at the top of my porch steps to figure out how to replace the light bulb in the Fort Knox of sconce lighting.

Categories
Fixing Stuff Laravel Samuel

Fixing Local Laravel Migration On Wamp 3.0.6

So We ran into an issue today when trying to migrate an old project on a newer version of wamp. The error we kept getting is:


[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default val
ue for 'created_at' (SQL: create table `marketing_sources` (`id` int unsign
ed not null auto_increment primary key, `name` varchar(100) not null, `note
s` text null, `created_at` timestamp default 0 not null, `updated_at` times
tamp default 0 not null) default character set utf8 collate utf8_unicode_ci
)

This error is caused by mysql not accepting a timestamp of 0 as the default set time. To fix this issue open up:

app > config > local-environment-folder > database.php

Then add the following line:
'strict' => true

*please note if you are using mysql then add this line to the mysql array.

Categories
Fixing Stuff Laravel Samuel

Laravel Local Environment Troubleshooting

Ran into this error today after setting up local environment:

The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.

Luckily there is a simple fix for this, documented below:

php artisan key:generate
*This will save an APP_KEY to your local .env file which will then be used to encrypt data.

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
Fixing Stuff Laravel Samuel

stop tracking changes to a file in Sourcetree

Came across an annoying issue the past couple times I tried pushing commits to the remote repo on a current project. My local machine has a “nesting” error when serving this project locally that that I wrote about fixing in a previous post. Well now the issue was when I went to commit some new code it wanted to commit the bootstrap auto loader file, which of course I did not want committed to the repo since this is only a problem on my local machine.

So step 1 opened the .gitignore file and added bootstrap/autoloader.php to it…… and nothing. Source tree still kept trying to force me to merge in the change to the file. I then tried “stop tracking this file” in source tree by right clicking on it and selecting the stop tracking option. Still nothing. So then tried restarting source tree, pulling down ect… all various things to try and get sourcetree to stop tracking the file to no avail. So finally went searching for a git command that would force sourcetree to ignore the file and came upon:

git update-index --assume-unchanged file.filename

To run this I simply opened up gitbash, which we covered installing on windows in a previous post. So open up gitbash, cd to boostrap, then run our handy new command: git update-index –assume-unchanged file.filename

Viola the next time I opened source tree the file was no longer hanging in the uncommitted changes :). If you were running into a similar issue hopefully this simple git command will help you out too!

—update—
If we need to stop tracking an entire directory use:

git rm -r --cached path_to_your_folder/