Category Archives: Development

Anything related to Programming and Program Development. Shaping our latest technologies.

Compiling Assets / Laravel 5.4 / Ubuntu 14.04 & 16.04

Check globally installed packages:

npm ls -g –depth=0

You do not need any globally installed NPM packages to compile these assets, so if you installed any because of this, go ahead and remove them now: npm uninstall -g [package]

Check your npm cache:

npm cache ls

If there’s anything in there, clear it:

npm cache clean

Also remove the node_modules folder in your current project.

rm -rf ./node_modules

Check your Nodejs version:

nodejs -v

If you’re not on 6.x.x, uninstall nodejs now:

sudo apt-get remove nodejs -y

Now prepare and install nodeJS  6, instructions for other versions are in the referenced article below.

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash – sudo apt-get install -y nodejs

now one last note, you need to install node-sass, for some reason it’s not in the package.json but it’s needed and you’ll get an error of missing folder.

npm i node-sass

Now navigate to your project folder and run: npm run prod

 

 

 

References:

https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions

MySQL Current Configuration File

WP-Config Disable Cron

define(‘DISABLE_WP_CRON’, true); //Disable page load cron

WordPress › Support » How to disable wp_cron via page loads and run it manually instead?.

Installing Python MySQLDB on Windows Errors

Well after trying to recompile the entire library, i came across this link.

http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python

A plethora of precompile python libraries.  What a great resource.

Up until i found the precompiled libraries i came across a plethora of errors trying to compile MySQLdb.  Errors I’ve gotten:

File setup_windows.py line 7, in get_config serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options[‘registry_key’])

error: Unable to find vcvarsall.bat

 

Hope this helps you as much as it did me.

Password protecting nginx

Create a Username/Password which will be stored in ‘useraccess’, a file I just made up.

htpasswd -b -c useraccess username password

Now in the nginx config, under:

auth_basic "Message box title of password prompt";
auth_basic_user_file /path/to/useraccess;

Free Cloud Hosting for a year? Sign me up!

http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=amazon+free+tier

WordPress-Smart 404 Plugin

A great tool for not showing 404 pages on your wordpress website.  I’ve used this for a couple years now.  I just recently discovered that if you type in a url with a keyword that cannot be found in your posts or pages, this plugin will show a 404 page.  The whole point of this plugin is to be smart right?  Well as a fix for now I’ve just made it default to your lastest post if it cannot find the keywords in the uri.  Fix can be found @ Pastebin: http://pastebin.com/1qb4h11V