Skip to content

Instantly share code, notes, and snippets.

View bmcminn's full-sized avatar

Brandtley McMinn bmcminn

View GitHub Profile
@bmcminn
bmcminn / dateFormatter.js
Created January 8, 2019 18:03
Naive helper functions...
var d = new Date();
function formatDate(dt, format, glue) {
glue = glue || '/';
format = format || 'mm/dd/yyyy';
if (typeof dt === 'string') {
dt = new Date(dt);
}
@bmcminn
bmcminn / acronyzer.php
Created December 21, 2018 18:23
A naive acronym generator
<?php
$things = [
// WORKING TEST CASES
'Aangenaam Door Vermaak En Nuttig Door Ontspanning' => 'ADVENDO', // "Pleasant by entertainment and useful by relaxation")[28][29]
'abdominal aortic aneurysm' => 'AAA',
'Amateur Athletic Association' => 'AAA',
'American Automobile Association' => 'AAA',
'American Standard Code for Information Interchange' => 'ASCII',
@bmcminn
bmcminn / auto-cookie-clicker.js
Last active June 18, 2019 15:53
cookie clicker automator
@bmcminn
bmcminn / touch-v-click.html
Last active May 22, 2018 18:09
Simple demo of pointer detection for preventing hover states from click-jacking mobile device input. (NOTE: this was inspired by a similar script I can't find the source for, but will update when I do)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Touch Vs. No-touch hover helpers</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@bmcminn
bmcminn / index.html
Last active April 9, 2018 19:51
Basic container query implementation in vanilla JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Container Queries in Vanilla JS</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@bmcminn
bmcminn / memoizer.php
Created January 31, 2018 19:11
A memoizer written in PHP that uses SQLite as it's persistence layer.
<?php
/**
* API Description
*
* # Memoize() utility
*
* ## Public Methods:
*
* getMemo($key)
@bmcminn
bmcminn / __bookmarks.js
Last active December 20, 2022 03:47
Bookmarklets for fun and profit!
// SILENCE!!!
@bmcminn
bmcminn / index.html
Created December 28, 2017 22:21
Example web app interface with sticky topnav and offscreen navigation
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>App Shell Test</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"></style>
@bmcminn
bmcminn / fs.js
Last active January 7, 2021 03:25
This is a custom "build" of my favorite FS utility methods from `grunt.file` and the native Node `fs` object
const gruntFS = require('grunt').fs
const nodeFS = require('fs')
// init exported fs object
const fs = {}
// Map Grunt.file methods
fs.copy = gruntFs.copy
fs.delete = gruntFs.delete
// fs.exists = gruntFs.exists
@bmcminn
bmcminn / index.html
Created May 4, 2017 20:15
HTML mobile app structure
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flexbox Test</title>
<style type="text/css">
html {
box-sizing: border-box;