Skip to content

Instantly share code, notes, and snippets.

View mjhea0's full-sized avatar

Michael Herman mjhea0

View GitHub Profile
@mjhea0
mjhea0 / Dockerfile
Last active January 29, 2020 22:43
centos 6 + python 2.6 Dockerfile https://hub.docker.com/r/mjhea0/centos-6-python-2.6/
# base image
FROM centos:6
# install epel
RUN rpm --import http://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-6 \
&& yum install -y epel-release
# install python
RUN yum install -y \
git \

Talk:

Intro to Docker + Node.js

This talk will intro you to the concept of containerization and the Docker ecosystem as a whole as well as how to Docker can be used to simplify your Node.js development workflow.


Speaker:

Duck Typing

It doesn't matter if it's a duck as long as it behaves (properties and methods match) like a duck.

class Duck {
  constructor(name) {
    this.name = name
  }
 takeOff() {
const fetch = require('node-fetch');
const url = 'http://www.omdbapi.com/?t=star+wars&y=&plot=short&r=json';
async function getData() {
let content
try {
const response = await fetch(url);
content = await response.json();
} catch (e) {
console.log(e);
@mjhea0
mjhea0 / audit_mixin.py
Created December 7, 2016 14:12 — forked from techniq/audit_mixin.py
Useful SQLAlchemy Mixins
from datetime import datetime
from sqlalchemy import Column, Integer, DateTime, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.ext.declarative import declared_attr
from flask_security import current_user
class AuditMixin(object):
created_at = Column(DateTime, default=datetime.now)
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
@mjhea0
mjhea0 / promises-faq.md
Created August 21, 2016 14:38 — forked from joepie91/promises-faq.md
The Promises FAQ - addressing the most common questions and misconceptions about Promises.
@mjhea0
mjhea0 / search-bash-zsh-history.md
Created July 12, 2016 14:47 — forked from nepsilon/search-bash-zsh-history.md
Searching bash or zsh history — First published in fullweb.io issue #55

Searching bash or zsh history

More often than not, you already typed yesterday the commands you’re about to use today. Wouldn’t it be handy to be able to retrieve the long command instead of typing them yet another time?

Hit Ctrl+R, you’ll see:

(reverse-i-search)`':
<style type="text/css"> section, p, h1, h2, h3 { text-align: left; } </style>

Intro to JS


@mjhea0
mjhea0 / README.md
Created July 3, 2016 19:27 — forked from alextucker/README.md
Installing Dokku and Deploying a Django App

Introduction to Data Structures


Standards

  • Implement, evaluate, and use some common data structures
  • Identify and diagram common data structures
  • Determine the correct data structure for interview-style problems