Skip to content

Instantly share code, notes, and snippets.

Building something new

Michael iMerica

Building something new
  • Austin, LA & NYC.
Block or report user

Report or block iMerica

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iMerica / functional-utils.js
Created Dec 11, 2018 — forked from bendc/functional-utils.js
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
View functional-utils.js
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)
iMerica /
Last active Sep 7, 2018
Custom Auth for Django/DRF that allows for multiple API Tokens per user.
from rest_framework.authentication import TokenAuthentication
from .models import RESTAPIToken
class CustomRestAPIAuthentication(TokenAuthentication):
""" Custom Authentication """
def get_model(self):
return RESTAPIToken
iMerica / filter.js
Last active Jul 30, 2018
Work At A Startup Job Filter
View filter.js
const findJobs = (remote, min_salary) => {
return window.TOP_LEVEL_PROPS.companies.filter(
company =>
job => ((job.remote_ok === remote) && (job.salary_max >= min_salary))
).length > 0
iMerica / docker-compose.yml
Last active Jan 14, 2019
Gitlab Docker Runners
View docker-compose.yml
version: '2'
restart: always
privileged: true
- /var/lib/docker
image: docker:18.06.0-ce-dind
- --storage-driver=overlay2
iMerica /
Created Jul 20, 2018
Job Offer Decision Making Framework
from dataclasses import dataclass
from typing import Sequence
This is a proof of concept framework for selecting job offers.
The general idea is to remove emotions from the decision
making process and first think about whats important to you, then
compare each offer against those factors.
iMerica / .gitlab-ci.yml
Last active Jul 18, 2018
Automated Deployments of Create React Apps to Cloudfront using Scotty JS.
View .gitlab-ci.yml
image: docker:latest
- docker:dind
- build
- push
- deploy
iMerica /
Last active Jan 17, 2020
Email verification in Django Rest Framework, Django All-Auth, Django Rest-Auth. Suitable for Single Page Applications
urlpatterns = [
url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(), name='account_confirm_email'),
iMerica / .gitlab-ci.yml
Created Jun 15, 2018
Docker based Gitlab CI workflow for Django
View .gitlab-ci.yml
image: docker:latest
- docker:dind
- build
- test
- push


There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.


  • ffmpeg
    • macOS: brew install ffmpeg
    • Ubuntu/Debian: apt install ffmpeg
iMerica /
Created Apr 24, 2018
Django Static Asset Versioning and Auto-Upload to S3/Cloudfront
from storages.backends.s3boto3 import S3Boto3Storage
from import ManifestFilesMixin
from tempfile import SpooledTemporaryFile
import os
class CustomStorage(ManifestFilesMixin, S3Boto3Storage):
""" Handles File Versioning + File Uploading to our CDN """
def _save_content(self, obj, content, parameters):
""" Hack to work around I/O error in Boto """
You can’t perform that action at this time.