Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Meandmybadself's full-sized avatar

Jeffery Bennett Meandmybadself

View GitHub Profile
@Meandmybadself
Meandmybadself / boilerplate.html
Last active August 29, 2015 14:07
Boilerplate HTML
<!DOCTYPE html>
<html lang='en'>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0">
<meta name="description" content="" />
<meta name="keywords" content="" />
<!-- fb -->
### Keybase proof
I hereby claim:
* I am meandmybadself on github.
* I am meandmybadself (https://keybase.io/meandmybadself) on keybase.
* I have a public key whose fingerprint is 0A33 C8A8 9D60 A9CF FAFF 103B C1BB 1B59 DE76 ABC0
To claim this, I am signing this object:
#!/bin/bash
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install homebrew's official php tap
brew tap josegonzalez/homebrew-php
@Meandmybadself
Meandmybadself / utilitybelt.js
Last active November 12, 2015 02:25
JavaScript utility belt
//A continual schmorgasboard of code that probably exists in a better documented & executed function elsewhere.
//Produces a # between min and max.
function between(min,max) {
var d = Math.abs(min - max);
return min + Math.random() * d;
}
//Integer between min & max.
function intBetween(min,max) {
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
@Meandmybadself
Meandmybadself / index.html
Created January 8, 2017 15:35
Basic HTML template.
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<link rel="shortcut icon" href="/assets/images/favicon.ico" type="image/x-icon" >
<link rel="stylesheet" href="">
<meta charset="utf-8">
<meta name="description" content="">
<meta name="author" content="">
@Meandmybadself
Meandmybadself / join.js
Created September 1, 2017 01:50
Joins movies in a directory using ffmpeg.
const fs = require('fs')
const dir = process.argv[2]
const txtFilename = 'files.txt'
const outputFilename = 'output.mp4'
const { exec } = require('child_process')
let output = ''
const files = fs.readdirSync(dir).filter(f => (
f !== '.DS_Store' &&
f !== outputFilename &&
@Meandmybadself
Meandmybadself / FontAwesome5.json
Created January 4, 2018 17:38
Font Awesome 5 glyph map
{
"500px": 62062,
"accessible-icon": 62312,
"accusoft": 62313,
"address-book": 62137,
"address-card": 62139,
"adjust": 61506,
"adn": 61808,
"adversal": 62314,
"affiliatetheme": 62315,
@Meandmybadself
Meandmybadself / fpo.js
Created August 14, 2018 15:15
Create FPO imagery from strings.
const http = require('http')
const fs = require('fs')
let imgs = [
"Image 1 Name",
"Image 2 Name",
"Image 3 Name",
]
const slugify = text =>
@Meandmybadself
Meandmybadself / image-dims.js
Created August 29, 2018 16:09
Provides resolution for all images in a given directory.
const sizeOf = require('image-size')
const glob = require('glob')
glob('*.*', {nodir: true, cwd: './i/'}, (err, files) => {
files.forEach(f => {
const dims = sizeOf(`./i/${f}`)
console.log(`${f}\t${dims.width}\t${dims.height}`)
})
})