Tag Archives: tutorial

How to create a free SSL cert for your website

One of the most annoying things about having a website is the fact that you have to pay for an SSL cert and that its an extra it shouldnt be.

I dont need an SSL cert!
100% true this website is only a blog but googles chrome browser no will start warning about sites not having an SSL cert and seriously fuck google for that.

Create and install a Free SSL cert for your website with ZeroSSL in the following video.  Its fairly simple and quick to do.

 

Getting started with Python and the Django Framework part 1

So over the christmas holidays ive been keeping myself busy by learning more about the Python language.

Having learnt a few basics i started to try the Django framework which ive seen mentioned quite a lot.  Im reffering to windows mainly in this case see below for more detailed instructions;
https://docs.djangoproject.com/en/2.0/howto/windows/

Step 1:
Install python from the site below and install the necessary version for your Operating system.
https://www.python.org/downloads/release/python-364/

Step 2:
Once you get that installed, verify that python is installed by typing “python” from the windows command prompt;

 

 

 

 

 

 

Step 3:
Install Django framework via command prompt;

pip install django

Step 4:
Create your first project its best to refer to the offical document and tutorials at;
https://docs.djangoproject.com/en/2.0/intro/tutorial01/

From the offical site;

Creating a project

If this is your first time using Django, you’ll have to take care of some initial setup. Namely, you’ll need to auto-generate some code that establishes a Django project – a collection of settings for an instance of Django, including database configuration, Django-specific options and application-specific settings.

From the command line, cd into a directory where you’d like to store your code, then run the following command:

This will create a mysite directory in your current directory. If it didn’t work, see Problems running django-admin.

Cakephp Tips – Sort Data With the Pagnator Component

If you wanted to sort a Model by a certain field in this case take the field “created” which is a date. We can simply tell cakePHP to pagnate entries by the order they were created by the following example.

More Examples can be found here;
https://www.codeofaninja.com/2013/07/pagination-in-cakephp.html

CakePhp Tip #6: Displaying items that belong to a user

cake-logo

Displaying items that belong to a user:

One of the most common things youll do in cakephp is list items that the user should only see. For example a user should just see their “posts” listed or their “articles” etc.

CakePHP has “Magic Find Types” that can help. For example if i wanted to list all the posts of the user_id =12

In my controller i can create an action as follows;

if i wanted to list all posts of the current logged in user;

To call view this action;

Source and more info;
http://book.cakephp.org/2.0/en/models/retrieving-your-data.html

How to: Create a batch file to open websites

tech-tip-iconWhile at college or work its a real pain when you login to have to open up 3 different websites and maybe 2 more applications.

Well with a simple “batch” file you can do it all. Simply open notepad and paste the following code into it and save it as “.bat” file then double click it to run it and hey presto no more annoying websites to have to type in, feel free to change the website address to what ever you want.

start http://www.gmail.com
start http://www.google.ie
start http://www.irishbloke.net