Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Youtube Tutorial - Peter</title>
<link rel="stylesheet" type="text/css" href="style/style.css">
</head>
<body>
<div id="pageWrapper">
<div id="header">
@peterentwistle
peterentwistle / index.html
Last active December 16, 2015 01:39
Code for the second tutorial. Contains both the index.html and table.html (http://www.youtube.com/watch?v=JYWUkORg7xU)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Youtube Tutorial - Peter</title>
</head>
<body>
<div id="pageWrapper">
<div id="header">
@peterentwistle
peterentwistle / index.html
Last active December 16, 2015 01:49
The code from the first lesson index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Youtube Tutorial - Peter</title>
</head>
<body>
<h1>Peter</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis ipsum ante. Quisque dui nisi, luctus et placerat id, ultrices non urna.</p>
@peterentwistle
peterentwistle / index.html
Last active December 16, 2015 02:08
The source for the fourth tutorial index.html and style.css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Youtube Tutorial - Peter</title>
<link rel="stylesheet" type="text/css" href="style/style.css">
</head>
<body>
<div id="pageWrapper">
<div id="header">
@peterentwistle
peterentwistle / index.php
Last active December 16, 2015 12:08
The code for the first basic login system tutorial.
<?php
session_start();
if (isset($_POST['username'])) {
// Set variables to represent data from database
$dbUsname = "Peter";
$dbPassword = "test1";
$uid = "1111";
// Set the posted data from the form into local variables
@peterentwistle
peterentwistle / dbConnect.php
Last active December 17, 2015 03:49
The code for the second part of the basic PHP login tutorial.
<?php
$dbCon = mysqli_connect("localhost", "root", "yourpasshere", "tutorials");
?>
@peterentwistle
peterentwistle / hello.py
Created November 10, 2013 21:28
hello.py for the first tutorial
print "Hello World!"
@peterentwistle
peterentwistle / bcrypt-test.php
Created March 24, 2014 14:57
PHP Login System Part 3 - Code source
<?php
$options = array('cost' => 12);
echo "Bcrypt: ";
echo $hash = password_hash("password", PASSWORD_BCRYPT, $options);
echo "<br>";
echo "Verify now:<br>";
if (password_verify('password', $hash)) {
echo 'Password is valid!';
} else {
echo 'Invalid password.';
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain user;killall Finder;echo "Open With has been rebuilt, Finder will relaunch"
<?php
$dbCon = mysqli_connect("localhost", "root", "yourpasshere", "tutorials");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* check if server is alive */