This HTML5 Canvas example simulates a large mass like a sun, and several small masses like planets orbiting around each other. Check out the simulator here: https://pghcpc.com/canvas/space.html Make sure to tap or click the page to display several settings to change the way the simulator looks and behaves. Here are a few screenshots.
Blog
HTML5 Canvas Brownian Motion Simulator
This HTML5 Canvas example simulates Brownian motion in particles, as well as creates some cool pictures. Check out the simulator here: https://pghcpc.com/canvas/brownian.html Make sure to tap or click the page to display several settings to change the way the simulator looks and behaves. Here are a few screenshots.
Create A New MYSQL Database and User
Here is a quick guide to creating a new MYSQL database, adding a user, and then finally a simple table. I will be using debian/ubuntu as the host system. First create the database. Login as the root user. Create the database user. Now grant the new user permissions on the new database. Don’t forget to… Continue reading Create A New MYSQL Database and User
Set Timezone for MYSQL / PHP
After setting system time, I discovered that mysql and php services didn’t also update the timezone settings. Here’s how to make sure they also reflect the correct timezone. First locate all the php.ini files in /etc now edit these files and add the timezone info add this to the [Date] block: For mysqld portion, first… Continue reading Set Timezone for MYSQL / PHP
Change Timezone on Raspian / Debian / Ubuntu
Here’s a quick and easy way to change the timezone configuration on Raspian / Debian / Ubuntu server, but will probably work on other linux flavors as well. First, lets see what our current configuration is: To get a list of all the supported time-zones: And something like this to grep for relevant ones: Next,… Continue reading Change Timezone on Raspian / Debian / Ubuntu
Simple HTTP Basic Auth on Apache2
Say you want to create a simple password protected folder in order to share some sensitive documents or what have you. Using apache2 and HTTP Basic Auth, this can be accomplished in only a few commands. First, create a folder in your web directory. Then, you will want to setup the username/password you want to… Continue reading Simple HTTP Basic Auth on Apache2