Skip to content

Instantly share code, notes, and snippets.

View mjhea0's full-sized avatar

Michael Herman mjhea0

View GitHub Profile
import datetime
import xlrd
from pprint import PrettyPrinter
def trim_nones(li):
""" remove trailing Nones from a list """
while li and li[-1] is None:
li.pop()
@mjhea0
mjhea0 / pr.md
Created June 11, 2014 20:29 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@mjhea0
mjhea0 / Dockerfile
Last active August 29, 2015 14:07 — forked from yadutaf/Dockerfile
FROM ubuntu:14.04
MAINTAINER Jean-Tiare Le Bigot "[email protected]"
ENV DEBIAN_FRONTEND noninteractive
# Grab all dependencies
RUN apt-get update \
&& apt-get -y upgrade \
&& apt-get -y install curl libx11-dev libxtst-dev libxcomposite-dev \
libxdamage-dev libxkbfile-dev python-all-dev \

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

<!DOCTYPE html>
<head>
<title>Example Checkout w/ Google Analytics Tracking</title>
</head>
<body>
<!-- Need this included just once on any page you're selling something. Best to probably globally include it. -->
<script type="text/javascript" src="https://www.simplegoods.co/assets/embed.js"></script>
<!-- You probably already have jQuery included in your site. Here for completeness -->
<snippet>
<content><![CDATA[
var ${2:${1/.*\/([^\.]+)[\.]?(.*)/$1/g}} = require('${1:lib}');
]]></content>
<tabTrigger>req</tabTrigger>
<scope>source.js</scope>
</snippet>
from django.views.generic import View
from django.shortcuts import get_object_or_404
from .decorators import json
from .models import RoomModel
from django.http import HttpResponse
class RoomView(View):
"""Room view class that implements the primary HTTP verbs (POST, GET, PUT, DELETE).
@mjhea0
mjhea0 / LICENSE
Last active May 22, 2016 03:18 — forked from ourmaninamsterdam/LICENSE
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@mjhea0
mjhea0 / The Technical Interview Cheat Sheet.md
Last active March 10, 2016 00:01 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.