Skip to content

Instantly share code, notes, and snippets.

View surdaft's full-sized avatar
🤓

SurDaft - Jack Stupple surdaft

🤓
View GitHub Profile
@surdaft
surdaft / bootstrap_config.json
Last active August 7, 2017 11:47 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
<?php
function humanize_filesize($size, $precision = 0) {
if ($size !== 0) {
$base = log($size) / log(1024);
$units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$size = round(pow(1024, $base - floor($base)), $precision);
$unit = $units[floor($base)];
} else {
$unit = 'B';
@surdaft
surdaft / serverCodes.md
Created April 18, 2019 09:39 — forked from sgnl/serverCodes.md
status codes

1xx: Information

Code Message Description
100 Continue The server has received the request headers, and the client should proceed to send the request body
101 Switching Protocols The requester has asked the server to switch protocols
103 Checkpoint Used in the resumable requests proposal to resume aborted PUT or POST requests

2xx: Successful

Code Message Description