Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Jared Davis Jared-Prime

:octocat:
View GitHub Profile
View timestamp_it.sh
#!/bin/bash
# Adds a timestamp beside every line of data received on STDIN.
# Turns this -> Into that:
# -> Time Data
# [INFO] event 1 -> 04-03-2014 12:00:01 [INFO] event 1
# [INFO] event 2 -> 04-03-2014 12:00:02 [INFO] event 2
# example usage: tail -f some.log | timestamp_it > some-timed.log
@Jared-Prime
Jared-Prime / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View roman_numerals.rb
# Feb, 27th, 2012
# Kevin and Jared at Mad Railers
# run with rspec
require 'rubygems'
require 'rspec'
def roman(number)
output = ""
conversion_table = {
@Jared-Prime
Jared-Prime / clean_docker_images.py
Created Jan 26, 2016 — forked from DrMavenRebe/clean_docker_images.py
Remove unlinked space from the docker drive
View clean_docker_images.py
#!/usr/bin/env python
"""
Check all existing Docker containers for their mapped paths, and then purge any
zombie directories in docker's volumes directory which don't correspond to an
existing container.
Taken from: https://github.com/docker/docker/issues/6354
"""
import logging
import os