Skip to content

Instantly share code, notes, and snippets.

@miwebguy
miwebguy / ShareLinks.txt
Last active March 15, 2024 12:43
Share Links
@miwebguy
miwebguy / CoreDates.php
Created September 2, 2021 14:39
PHPDateStuff
<?php
class CoreDates
{
/**
* @brief Return the greater of 2 dates
* @param $_first (str date)
@miwebguy
miwebguy / VBInstallScreenTooSmall.md
Last active August 10, 2021 19:29
Virtualbox Linux install - install screen to small?
@miwebguy
miwebguy / gist:bb971144b5a67d466e1c8250a08c7930
Created June 17, 2021 18:35
VB-Ubuntu Small Install Screen
https://stackoverflow.com/questions/57115746/virtualbox-screen-resolution-too-small-during-installation
Boot the installer in EFI mode not legacy-BIOS mode.
It's Settings->System->Enable EFI (special OSes only).
I just tested this with POP!_OS 20.10. BIOS mode: tiny 800x600 window. EFI mode: window is large enough to fit the installer.
If you do get an 800x600 window, you can also move the installer window so that you can see the desktop, right-click on the desktop, choose "Display Settings", and increase the resolution.
<style>
/* based on https://codepen.io/dannibla/pen/amgRNR */
.floating-label {position:relative}
.floating-input {display:block; width:300px; background-color:transparent}
.floating-label label {font-weight:normal;position:absolute;pointer-events:none;left:9px;top:8px;font-size:smaller; transition: all .2s ease-in-out;}
.floating-input:focus {margin-top:12px}
.floating-input:focus ~ label, .floating-input:not(:placeholder-shown) ~ label {top:-2px;background-color:#fff; transition: all .2s ease-out-in;}
.floating-select:focus ~ label , .floating-select:not([value=""]):valid ~ label {top:-18px}
/**** floating-Lable style end ****/
</style>
@miwebguy
miwebguy / table2csv.js
Created March 11, 2021 15:00
VanillaJS Table to CSV Export
function table2csv(table_id) {
// based on https://stackoverflow.com/questions/15547198/export-html-table-to-csv
// Quick and simple export target #table_id into a csv
var separator = ',';
// Select rows from table_id
var rows = document.querySelectorAll('table#' + table_id + ' tr');
// Construct csv
var csv = [];
for (var i = 0; i < rows.length; i++) {
@miwebguy
miwebguy / NiceBlockQuotePattern.html
Created December 30, 2020 14:52
NiceBlockQuotePattern
<style>
blockquote {
background: #f9f9f9;
border-left: 10px solid #ccc;
margin: 1.5em 10px;
padding: 0.5em 10px;
quotes: "\201C""\201D""\2018""\2019";
}
blockquote:before {
color: #ccc;
/* https://j.eremy.net/responsive-table/ */
@media only screen and (max-width: 767px) {
.responsive thead {display:none}
.responsive tr {clear:both;}
.responsive td {display:block}
.responsive td[data-label]:before {font-weight:bold;content:attr(data-label);display:inline-block;padding:0 1em 0 0;text-align:left}
.responsive td:last-child:after {content:"";clear:both;border-bottom:1px solid #ccc}
.responsive td{text-align:left !important}
.responsive td:empty {display:none}
.responsive tfoot tr {background:none !important}
@miwebguy
miwebguy / TableFilter.js
Created April 28, 2020 15:36
TableFilter.js
/**
* Table Filter
* @usage: <input type="search" onkeyup="Tablefilter(this, 'VReportList')" />\
* where VReport is the id of the table body
*/
function Tablefilter (phrase, _id) {
var words = phrase.value.toLowerCase().split(" ");
var table = document.getElementById(_id);
var ele;
<html>
<head>
<style>
.eye {position:relative;display:inline-block;height:10px;width:10px;margin-left:5px;margin-top:20px;border:1px solid #ccc;border-radius:10px;}
.eye:first-child {margin-left:10px}
.eye span {position:absolute;top:50%;left:0%;display:block;width:5px;height:5px;border-radius:5px;background:#000}
</style>
</head>