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 | |
// usage: $newpassword = generatePassword(12); // for a 12-char password, upper/lower/numbers. | |
// functions that use rand() or mt_rand() are not secure according to the PHP manual. | |
function getRandomBytes( $nbBytes = 32 ){ | |
$bytes = openssl_random_pseudo_bytes( $nbBytes, $strong ); | |
if ( false !== $bytes && true === $strong ) { | |
return $bytes; | |
} |
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" data-theme="green"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>CSS Custom Properties Test</title> | |
<!-- Assembled by Damion Armentrout, 2018. --> | |
<style> | |
/* HSL is cool. https://www.sarasoueidan.com/blog/hex-rgb-to-hsl/ */ |
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
var cars = { | |
"acura": { | |
"color": "blue", | |
"year": 2009 | |
}, | |
"buick": { | |
"color": "gray", | |
"year": 2010 | |
}, | |
"chevy": { |
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
<!-- put this in the HEAD --> | |
<script> | |
var newestVersion = Date.now(); | |
var linkSrc = 'style.css?version=' + newestVersion; | |
var theLink = document.createElement("link"); | |
theLink.href = linkSrc; | |
theLink.rel = 'stylesheet'; | |
document.head.appendChild(theLink); | |
</script> |
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
# -*- coding: utf-8 -*- | |
# ABV 1.0 12/31/2012 | |
# This is one of my very first side projects as a programmer/developer! | |
print ''' | |
Calculate the Alcohol by Volume (ABV) of your | |
homebrewed beer using the following formula: | |
ABV = ((((OG-FG)*1.05)/FG)/0.79)*100 | |
1.05 g — the amount of CO2 per gram of ethanol produced | |
0.79 g/mL – the density of ethanol alcohol |
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.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>CRT TEXT</title> | |
<meta name="inspiration" content="https://i.redd.it/cgcpgwpa60841.jpg"> | |
<style> | |
* { box-sizing: border-box; } |
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.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Boxes</title> | |
<style> | |
:root { | |
--box-w: 10vw; |
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.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>mouse</title> | |
<style> | |
* { box-sizing: border-box; } | |
html, body { width: 100%; height: 100%; padding: 0px; margin: 0px; } |
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.0"> | |
<title>Simple Text Editor</title> | |
<style> | |
* { box-sizing: border-box; } | |
html, | |
body { |
OlderNewer