Skip to content

Instantly share code, notes, and snippets.

View bbrewer97202's full-sized avatar

Ben Brewer bbrewer97202

View GitHub Profile
@rmetzger
rmetzger / gist:e556bfda8082bceeae6a32e7e0208bb6
Last active January 16, 2022 11:36
Free Docker on Mac Alternative using Hyperkit from minikube
brew install minikube
brew install hyperkit
minikube config set driver hyperkit
minikube start --memory 8192 --cpus 5 --disk-size=80GB

brew install docker
# point docker to the minikube env
eval $(minikube -p minikube docker-env)
# validate setup
@basimhennawi
basimhennawi / graphicsmagick.txt
Last active May 24, 2022 19:20
Graphicsmagick and Imagemagick static binaries for AWS Lambda
# Must be run on an Amazon Linux AMI that matches AWS Lambda's runtime
# As of Dec 6, 2018, this is Amazon Linux AMI – amzn-ami-hvm-2017.03.1.20170812-x86_64-gp2
# Check latest from here: https://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html
# SSH to Amazon Linux AMI instance, that you just created:
ssh -i ${EC2_KEY} ${EC2_USERNAME}@${EC2_IP}
sudo yum -y install libpng-devel libjpeg-devel libtiff-devel gcc
# GraphicsMagick download latest stable as of Dec 6, 2018, this is 1.3.31 (latest stable)
curl -O https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.31/GraphicsMagick-1.3.31.tar.gz
@chadclark
chadclark / 01-bg-img-path.scss
Last active December 16, 2015 21:20
A .scss mixin that makes it easy to include a .png fallback for .svg background images when using Modernizr.
// ---------------------------------------------------------------------------------
// CSS Image Paths
// ---------------------------------------------------------------------------------
$bg-img-path: '/path/to/images/'; // Base Path for BG Layout Images
@eirikbacker
eirikbacker / addEventListener-polyfill.js
Created June 3, 2012 19:30
addEventListener polyfill for IE6+
//addEventListener polyfill 1.0 / Eirik Backer / MIT Licence
(function(win, doc){
if(win.addEventListener)return; //No need to polyfill
function docHijack(p){var old = doc[p];doc[p] = function(v){return addListen(old(v))}}
function addEvent(on, fn, self){
return (self = this).attachEvent('on' + on, function(e){
var e = e || win.event;
e.preventDefault = e.preventDefault || function(){e.returnValue = false}
e.stopPropagation = e.stopPropagation || function(){e.cancelBubble = true}
var application_root = __dirname,
express = require("express"),
path = require("path"),
mongoose = require('mongoose');
var app = express.createServer();
// database
mongoose.connect('mongodb://localhost/ecomm_database');
@ryandotsmith
ryandotsmith / a-backbone-js-demo-app-sinatra-backend.md
Created January 22, 2012 01:42
Backbone demo app with sinatra backend

A Backbone.js demo app (Sinatra Backend)

Oct 16 2010

Updates

  • 04/10/2011 - Updated application.js and application.rb thanks to @rebo's comments

In this article, I will walk through some simple steps to get a [demo app][2] up and running with [Backbone.js][3] and [Sinatra][4] on [Heroku][5].

@bentruyman
bentruyman / Custom.css
Created August 22, 2011 19:35
Tomorrow Theme for Chrome Developer Tools
/**********************************************/
/*
/* Tomorrow Skin by Ben Truyman - 2011
/*
/* Based on Chris Kempson's Tomorrow Theme:
/* https://github.com/ChrisKempson/Tomorrow-Theme
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@fwielstra
fwielstra / api.js
Created June 14, 2011 14:46
An example NodeJS / Mongoose / Express application based on their respective tutorials
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
*/
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');