Categories
Laravel Samuel

Random laravel notes

kept running into this strange error for a few minutes tonight, but finally got to the bottom of it.

if you are getting “reflectionException” “controllerName does not exists” this is because you already have the controller created in your route.php file. Remove it from routes.php (or comment it out the save). Now run the command again and it will succeed.

 

how to make laravel controllers via command line:

controller:make MarketingController

when there is a conflict in tortise git:

-click on the file in conflict, hit git stash
-pull down the new code
-right click on the white space in the folder (not on the actual file) hit stash pop (this will merge your stashed file with the new one)
-commit then push

 

if php artisan migrate is not working, just run php artisan migrate:refresh and it will run the latest migrations.

if you are running DB seeders and getting an error, to find out what file the error is in run: php artisan db:seed -v this will spit out the error info of what file the seeder breaks on and what line specifically breaks it.

Categories
Fixing Stuff OBDII Samuel

setting up scantool.net simulator

notes from  setting up the scantool simulator:

 

1.) The drivers did not install properly by default, to fix go here: http://www.ftdichip.com/Drivers/VCP.htm .  download the “available as setup executable link under windows, then run the .exe file

 
2.) open up realterm (download link http://realterm.sourceforge.net/index.html#downloads_Download)  go to the “port” page and set:
baud 115200
data bits 8
parity none
stop bits 1

*hit change then click into terminal window to type commands

*type RESET to reset the device and see if your connection is working properly

 

3.) The correct pin arrangement on the device to work with OBDII protocol is #1 set to “on” #2 set to “off” …. these are the physical switches on the actual simulator

 

 

Categories
Fixing Stuff Laravel

installing node.js on windows 7 computer

Installing node.js on my windows 7 machine  was a bit of a struggle so I wrote down the notes:

 

1.) Install node.js from their site.  Just use the big green button, download the installer

2.) Run their auto installer and then open up git bash (note open it up in the project folder you are attempting to install bower in)

3.) If your using windows you will need to install node.js then set your environment variables (start > run > environment variables > path > edit ) then add this line to the end “;C:\Program Files\nodejs”

4.) Open up git bash and type “npm install” (if you get an error you will just need to manually create the “npm” folder in (C:\Users\your-user\AppData\Roaming ).  *replace your-user with your current user, and also its possible your file path will be different, if a different file path is echo’d out in the command prompt then use that file path.

5.) you should be able to type “npm” and load the node package manager, once that loads you can type “bower install” and load bower then you should be all set to use data tables (or whatever you loaded node.js into your project to do)

 

Categories
Random News Samuel

Preventing gun sales to mentally unstable people

Stopping guns from being purchased by mentally unstable people is a pretty big topic in the news lately, and for whatever reason this idea popped into my head today so I decided to think about it for a while.  The common narrative is for the government to legislate a way to help prevent unstable people from buying guns, but seeing as how legislation that prohibits things is so rarely effective I think we would be much better served looking at a way to try and solve this on our own.

It occurred to me that a good place to start when looking for a solution to this would be to look at any company’s who have already solved the problem of weeding out crazy people from using their service. One such company came to mind instantly, AirBnB.  This company digs up so much shit on you when you sign up.  You have to give them your drivers licence and a few other details, and the amount of information they find on you is pretty amazing.  The first thing we should do is take a look at their algorithm and figure out how they are finding so much information about people and model our gun buying protection program after that.

Next when someone is purchasing a gun, an interesting approach we could take is we have the user temporarily download an APP onto their phone as part of the buying process.  This app could:

provide us their email address (which we could also scan for unstable emails)

provide us their login to twitter/facebook/whatever social network they have linked (which we could again scan for unstable messages)

provide us their text messages which we could scan for unstable messages

provide us their website browsing history which we could scan for troublesome website visits

**once the person was cleared they could could delete the app from their phone, and the app would not store any of the data it scanned

**we could incentivize gun stores to have users download and install this app (maybe a tax credit for every customer that does, maybe publicly shame the stores that don’t join the program, maybe just simply ask them to do it and see if the benefit of “doing the right thing” would be all that they need).  To get their buy in we would have to involve them in the process from the start.

Beyond the APP we could also look more into the AirBnB process of doing background checks, looking up school records, looking up a person credit ect… I think the moral of the story is if we look around advertising company’s spend countless millions of dollars data mining people and building profiles on them. All we need to do is look into a way to access this data before selling someone a gun, this type of approach will be much more effective than any kind of legislation.

 

 

 

 

 

Categories
Fixing Stuff Samuel Technology

quick way to limit wp-admin logins on wordpress

this is a really helpful little code snippet to limit logins to your wordpress site.  You put this .htaccess file in your /wp-admin/ directory:

 

# Limit logins and admin by IP
<Limit GET POST PUT>
order deny,allow
deny from all
allow from YOUR IP ADDRESS
</Limit>

Categories
Inspirational Samuel

Great post on empathy

I stumbled upon this post today, not really sure what I was doing or how I came across the link but I loved the post. It hit home for me in a lot of ways and if nothing else just so I have an easy way to find it I wanted to jot it down:

 

http://sivers.org/real