Skip to content

Instantly share code, notes, and snippets.

HTML5 Basics

This tutorial will introduce you to the basics of the HTML5 markup language, which can be used to create the content portion of your web site. We will be using HTML5 to build a basic blog.

To get started with this tutorial, all you need is a text editor and a web browser. Just about any text editor will do, as long as it can save files as plain text. On Windows, Notepad will work fine, though there are a number of free text editors that might provide a better experience. Notepad++, available online at http://notepad-plus-plus.org/ is one such editor. On the Mac, I recommend downloading a copy of TextWrangler from http://www.barebones.com/products/textwrangler.

Since we're working with HTML5 and it's a relatively new language, you will want to make sure you have a browser that supports the new features. I recommend the latest version of Chrome, Safari, or Firefox. Internet Explorer 9 should also work just fine.

Getting started

@simtabi
simtabi / meta-tags.md
Created March 4, 2018 09:14 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@simtabi
simtabi / metatags.html
Created March 4, 2018 09:14 — forked from MicBrain/metatags.html
The list of useful meta tags used in HTML5 documents.
<html>
<head>
<!--Recommended Meta Tags-->
<meta charset="utf-8">
<meta name="language" content="english">
<meta http-equiv="content-type" content="text/html">
<meta name="author" content=”Rafayel Mkrtchyan”>
<meta name="designer" content=”Rafayel Mkrtchyan”>
<meta name="publisher" content=”Rafayel Mkrtchyan”>
@simtabi
simtabi / meta-tags.md
Created March 4, 2018 09:16 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@simtabi
simtabi / php_random_array_element.md
Created February 24, 2021 14:34 — forked from zgulde/php_random_array_element.md
how to get a random array element in php

Getting a random element from an array

tldr: the function at the end of this gist will give you a random array element

Figuring out how to get a random array element will give a better understanding of how PHP works, as well as how arrays work in general.

Lets start with this code:

$numbers = [1, 2, 3, 4, 5];
@simtabi
simtabi / AppDatabaseSessionHandler.php
Created October 28, 2021 00:00 — forked from wadtech/AppDatabaseSessionHandler.php
Laravel 5.3 Custom Database Session Handler Example
<?php
namespace App\Extensions;
// we have an Eloquent model that allows using the session table with the querybuilder methods and eloquent fluent interface- read only!
use App\Session;
// use the provided database session handler to avoid too much duplicated effort.
use Illuminate\Session\DatabaseSessionHandler;
class AppDatabaseSessionHandler extends DatabaseSessionHandler
@simtabi
simtabi / Laravel-Container.md
Created October 28, 2021 21:22
Laravel's Dependency Injection Container in Depth

Laravel's Dependency Injection Container in Depth

Translations: Korean (by Yongwoo Lee)

Laravel has a powerful Inversion of Control (IoC) / Dependency Injection (DI) Container. Unfortunately the official documentation doesn't cover all of the available functionality, so I decided to experiment with it and document it for myself. The following is based on Laravel 5.4.26 - other versions may vary.

Introduction to Dependency Injection

I won't attempt to explain the principles behind DI / IoC here - if you're not familiar with them you might want to read What is Dependency Injection? by Fabien Potencier (creator of the Symfony framework).

@simtabi
simtabi / UsingSSLwithMAMP.md
Created November 3, 2021 16:12 — forked from malinky/UsingSSLwithMAMP.md
Using SSL with MAMP

Overview

Having read a number of guides on using SSL with MAMP I still couldn't get things working properly. This is my guide which takes ideas from a number of resources. As with the guides I'd previously read this may or may not work for you but either way I hope it helps.

Generate SSL Certificate

  1. I imagine you can generate a wildcard certficate for all local sites but this didn't work for me so I generated a certificate for each local site individually. This method uses the subjectAltName field as this is required since Chrome 58.

  2. Create the following file in your user folder and save as server.csr.cnf. Remember to change your Country (C), State (ST), Location (L), Organisation (O), Oganisational Unit (OU), Email Address( emailAddress) and Common Name (CN). For the common name I matched with my local site name as defined in my hosts file.

@simtabi
simtabi / how-to-set-up-stress-free-ssl-on-os-x.md
Created November 3, 2021 16:58 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying