This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
font-size: 100%; | |
box-sizing: border-box; | |
} | |
* { | |
box-sizing: inherit; | |
} | |
body { | |
margin: 0; | |
background: #000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div class="col-xs-12 text-center"> | |
<h2>Select version:</h2> | |
<div class="btn-group" data-toggle="buttons"> | |
<label id="esv" class="btn btn-primary active"> | |
<input type="radio" autocomplete="off">ESV | |
</label> | |
<label id="kjv" class="btn btn-primary"> | |
<input type="radio" autocomplete="off">KJV | |
</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// produce a data string in this format: 2015-12-17 01:31:39 | |
function getDate() { | |
var date = new Date(); | |
timestamp = date.getUTCFullYear() + '-' + | |
('00' + (date.getUTCMonth() + 1)).slice(-2) + '-' + | |
('00' + date.getUTCDate()).slice(-2) + ' ' + | |
('00' + date.getUTCHours()).slice(-2) + ':' + | |
('00' + date.getUTCMinutes()).slice(-2) + ':' + | |
('00' + date.getUTCSeconds()).slice(-2); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
scores = {"A": 1, "C": 3, "B": 3, "E": 1, "D": 2, "G": 2, | |
"F": 4, "I": 1, "H": 4, "K": 5, "J": 8, "M": 3, | |
"L": 1, "O": 1, "N": 1, "Q": 10, "P": 3, "S": 1, | |
"R": 1, "U": 1, "T": 1, "W": 4, "V": 4, "Y": 4, | |
"X": 8, "Z": 10} | |
# Get the Scrabble rack from the command line. | |
if len(sys.argv) < 2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// allow error reporting | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
?> | |
<?php | |
// put your own values after the equals signs | |
$server = "localhost"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php include 'database.php'; ?> | |
<?php | |
$query = "SELECT * FROM shouts ORDER BY id DESC LIMIT 20"; | |
$shouts = mysqli_query($conn, $query); | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name=viewport content="width=device-width, initial-scale=1"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// $conn comes from a separate database connection file | |
// this is a partial, nonworking file | |
try { | |
// Let's begin a transaction | |
mysqli_begin_transaction($conn, MYSQLI_TRANS_START_READ_ONLY); | |
// There can be a set of queries | |
// If any one fails, an exception should be thrown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// this is a partial, nonworking file | |
$salt1 = "qm&h*"; | |
$salt2 = "pg!@"; | |
$first_name = "Bill"; | |
$last_name = "Smith"; | |
$username = "bsmith"; | |
$password = "secret"; | |
$token = hash('ripemd128', "$salt1$password$salt2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$salt1 = "mj&h*"; | |
$salt2 = "pq!@"; | |
if ( isset($_POST['username']) && isset($_POST['password']) ) { | |
if ( $_POST['attempt'] == 0 ) { | |
$username = $_POST['username']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name=viewport content="width=device-width, initial-scale=1"> | |
<title> Test </title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"> </script> | |
</head> | |
<body> |