Skip to main content

Posts

My Arduino journey

So I was starting off the Arduino and I did not know a thing about it! All I knew is that you could be Iron Man from this tiny thing. My skill was coding and none of the hardware stuff so I knew I had to learn. This post serves to document my journey into this Arduino world. What I know so far... Arduino is open source, the hardware AND software(Cool huh?) Arduino needs an IDE  You can connect it to your pi STEP ONE: Download the IDE from  this link. Depending on the OS. I'm on Ubuntu 16.04. I downloaded- did the ./install.sh and voila! done. What the challenge now was to navigate the board properly but after a bit of reading I learnt that pin 13 has an inbuilt resistor  and putting in the LED was now easy as cathode gets into the GND and  our friendly pin 13 has our back! Now my challenge became the permission error then I realised how to set permissions with this Linux code sudo chmod a+rw /dev/ttyACM0 And you ready to go! Seconds later- I h...

Deploy Django app online for free!

So after a number of lines of code, brilliance and dreaming. Your next dream is for the world to see. Of course you can walk around with your computer and doing a 'manage.py runserver' But cumon guys, lets embrace the cloud. Not like this guy though! I choose to deploy on  PythonAnywhere . So you ask why? 1) Free amazing support - You actually talk to a live human ! 2) Easy - Very easy 3) Affordable - As you scale up, it gets way better! So by now I assume you are already on a version control system (So I will not waste much energy on that one). Maybe Ill someday write on my two favs  Github  and  Bitbucket . STEP 1: Create an account on pythonanywhere. Kindly note that your username will be included in your apps url. So it will be like : " yourUsername .pythonanywhere.com" STEP 2: Select other and set a bash console. STEP 3: Push your code from version control This will push from (in my example) github to your pythonanywhere. You...

Django & Firebase - A marriage of awesomeness

Requirements 1) Django (obviously) 2) Pyrebase (pip install pyrebase, you know the drill) So to give a better appreciation- I will first show you the HTML way then I'll proceed to show you how its done in Python. METHOD 1 : The HTML way Then you need to go to the firebase console. To setup a new project. After that you will see a web setup and you select that. Once selected you will see the config. It should be similar to this : Now that you have configured firebase, we now need to select the components which will be needed. depending on what you want for your app- you can now select the modules that you need. For us today, we will do the login authentication. Make sure you include firebase app first, so this is my screen: METHOD 2: Enter Python Open your dev environment and create a file named  pyrebase_settings within your django app folder. In it, you will have the following: Now, lets go to views.py!

Django Hosting - Bluehost

Python Version: 3.6.1 Django Version : 1.10.2 So recently I migrated to the Bluehost VPS. Why Bluehost you may ask ? The price and they are django friendly.  They don't provide up to date versions of Python though so you have to install it yourself in your home directory.  Apart from that they are about as "Django Friendly" as any other shared host. One thing I can say is you really get good value for money with them and a huge amount of storage. Excellent decision but what made it a little hectic was now configuring so I decided to write this post  to help out on setting up django. One friendly reminder- make sure you have your versions on lockdown. I am compiling the current latest version 1. SSH Although the whole world seems to support PUTTY. I feel Teraterm does the job for me (Maybe its me but PUTTY doesn't support SSH2?) Anyways, if you are to use windows. Linux and Mac are straight forward.  So without further ado, login into your VPS server. 2....

Trump wins ! So what next? (For Africa)

Expect a few deportations This was a great divider between Hillary and Trump. When the guy started his bid for the white house- his ‘signature policy’ was against immigrants who have entered illegally. So if there some of us who are in the states under dodgy circumstances- we gotta get our act up together. The sooner, the better, like seriously guys- it was featured prominently on his campaign website. Critics, of course blasted him for this.  Trump conceded and was now advocating temporarily banning immigration “from regions that export terrorism and where safe vetting cannot presently be ensured.” That being said.. he did say he planned to set up a ‘deportation force’. So he might have softened, but he hasn’t ruled out mass deportation. Any country that refuses to accept its aliens – would risk losing the US Visa altogether. Expect tougher immigration laws. Libya might get some peace.. Or not The Republican billionaire has said he would recruit NATO to invade strong...

Why I think the fiat money system is useless – PART 2 (Aurum potestas est)

Hey guys. So as promised – I will give a brief breakdown of the gold standard. The gold standard was based on valuing money based on the quantity of gold. The standard was largely dropped in 1976- spearheaded by US President Nixon favouring neo-classical economics.  It is worthy of note though, that most countries still hold large gold reserves. Here’s a somewhat random quote that will hold much more meaning as we delve more and more into the fall of the gold standard. “All paper money returns to its intrinsic value.” – Voltaire. When gold was found at Sutter's Ranch in 1848, it inspired the Gold Rush to California and the unification of western America. In 1861,  U.S. Treasury Secretary  Salmon Chase printed the first U.S. paper currency. In fact, by the mid-1800s, most countries wanted to standardize transactions in the booming world trade market. They adopted the gold standard . It guaranteed that the government would redeem any amount of pape...