Skip to content

Instantly share code, notes, and snippets.

View bjonesy's full-sized avatar

Brandon Jones bjonesy

View GitHub Profile
#!/bin/bash
set -eo pipefail
TARGETFMT='/opt/vagrant/embedded/gems/gems/vagrant-%s/plugins/providers/virtualbox/driver/meta.rb'
die() { echo >&2 "$@"; exit 1; }
[[ $EUID -eq 0 ]] || die "sudo required"
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 10, 2024 06:12
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@andipaetzold
andipaetzold / dataURLToBlob.js
Created February 19, 2015 14:39
Data URL to Blob in JavaScript
// source: https://github.com/ebidel/filer.js/blob/b7ab6f4cbb82a17565ff68227e5bc984a9934038/src/filer.js#L137-159
var dataURLToBlob = function(dataURL)
{
var BASE64_MARKER = ";base64,";
if (dataURL.indexOf(BASE64_MARKER) == -1)
{
var parts = dataURL.split(",");
var contentType = parts[0].split(":")[1];
var raw = decodeURIComponent(parts[1]);
@hullen
hullen / get_gallery_attachments.php
Last active March 9, 2020 20:57
Extract images ids from gallery shortcode into post_content of the wordpress posts or custom post types.