Skip to content

Instantly share code, notes, and snippets.

View ahopkins's full-sized avatar

Adam Hopkins ahopkins

View GitHub Profile
@ahopkins
ahopkins / progress.py
Created April 9, 2018 07:41 — forked from vladignatyev/progress.py
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# 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:
#
@ahopkins
ahopkins / configure.sh
Created February 19, 2018 07:33 — forked from alexellis/configure.sh
Kubernetes-weave-ubuntu.sh
#!/bin/sh
sudo apt-get update \
&& sudo apt-get install -qy docker.io
sudo apt-get update \
&& sudo apt-get install -y apt-transport-https \
&& curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
import Ember from 'ember';
export default Ember.Controller.extend({
appName: `Ember's Route Hook Order`,
queryParams: ['foo'],
foo: null,
actions: {
clearLog() {
Ember.$('.log-item').remove();
@ahopkins
ahopkins / extract_emails_from_text.py
Created November 17, 2016 00:35 — forked from dideler/example.md
A python script for extracting email addresses from text files. You can pass it multiple files. It prints the email addresses to stdout, one address per line. For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.
#!/usr/bin/env python
#
# Extracts email addresses from one or more plain text files.
#
# Notes:
# - Does not save to file (pipe the output to a file if you want it saved).
# - Does not check for duplicates (which can easily be done in the terminal).
#
# (c) 2013 Dennis Ideler <ideler.dennis@gmail.com>