Skip to content

Instantly share code, notes, and snippets.

View mikeblum's full-sized avatar
🥝

Michael Blum mikeblum

🥝
View GitHub Profile
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@mikeblum
mikeblum / backboneSync
Created February 15, 2014 22:31
Override backbone sync
sync: function (method, model, options) {
Backbone.sync.call(method, model, options);
}
//from http://stackoverflow.com/a/18839219/1377866
@mikeblum
mikeblum / typeahead.less
Created January 8, 2015 16:25
Twitter Typeahead Styling Template
div.typeahead-dropdown{
padding-top: 0px;
padding-bottom: 0px;
width: 100%;
background-color: #fff;
}
.form-horizontal > .typeahead-group{
margin-right: 0px;
margin-left: 0px;
@mikeblum
mikeblum / states_hash.json
Last active March 31, 2016 18:16 — forked from mshafrir/states_hash.json
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",
@mikeblum
mikeblum / README.md
Last active February 17, 2022 19:51
Branching/tagging Github Wikis

##Branching/tagging Github Wikis##

###Creating an HPI Wiki release###

Download HPI

git clone https://github.com/tsgrp/hpi.git hpi

Download the HPI Wiki - this url is found by adding wiki to the repository Git url:

@mikeblum
mikeblum / zk-solr-deployment.yml
Created January 6, 2016 23:26
docker-compose script for creating a distributed SolrCloud cluster on AWS ECS
zookeeper:
image: "987737556516.dkr.ecr.us-east-1.amazonaws.com/tsgrp/zookeeper"
cpu_shares: 100
ports:
- "2181:2181"
container_name: "zookeeper"
hostname: "zookeeper"
solr1:
image: solr
@mikeblum
mikeblum / package_and_deploy_lambda_function.sh
Created July 3, 2016 04:00
Deploy Python Lambda fucntions to AWS
#!/bin/bash
# expects the lambda function .py file to be in the same directory as this script.
# based off of Amazon's official documentation:
# http://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html#with-s3-example-deployment-pkg-python
# get the lambda function
lambda_func_file=$1
lambda_func="${lambda_func_file%.*}"
# exit if no file specified
[[ -z "$1" ]] && { echo "Lambda function is empty" ; exit 1; }
# generate a deployment timestamp
@mikeblum
mikeblum / default.rb
Last active July 3, 2016 18:50
Chef recipe for creating a Solr instance
# recipes/default.rb
# Cookbook Name:: apache_solr
# Recipe:: default
#
# Copyright 2016, Michael Blum
#
if node['solr']['install_java']
include_recipe 'java_se'
end
@mikeblum
mikeblum / README.md
Created August 1, 2016 03:58 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


Index:

@mikeblum
mikeblum / sizeChecker.java
Created September 8, 2016 20:26
Calculate the size of an InputStream
package size_checker;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
public class SizeChecker {