Skip to content

Instantly share code, notes, and snippets.

View lroot's full-sized avatar

Larry lroot

View GitHub Profile
@lroot
lroot / md5.js
Created September 11, 2019 16:44 — forked from MichaelPote/md5.js
invalid reference fix and fixed add32 not being overwritten properly.
/*
* http://www.myersdaily.org/joseph/javascript/md5-text.html
*/
(function (global) {
var md5cycle = function (x, k) {
var a = x[0],
b = x[1],
c = x[2],
d = x[3];
<?php
/**
* Join a string with a natural language conjunction at the end.
*/
function natural_language_join(array $list, $conjunction = 'and') {
$last = array_pop($list);
if ($list) {
return implode(', ', $list) . ' ' . $conjunction . ' ' . $last;
}
return $last;
@lroot
lroot / 0_reuse_code.js
Created March 8, 2016 17:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 boilerplate</title>
<link rel="stylesheet" href="css/style.css">
<script src="js/main.js"></script>
</head>
<body>
<h1>HTML5 boilerplate</h1>