Skip to content

Instantly share code, notes, and snippets.

View balos1's full-sized avatar

Cody Balos balos1

View GitHub Profile
@balos1
balos1 / docker-mongodump
Last active February 9, 2021 22:41
Dumps a mongodb database from a docker data container / restores a mongodb database dump to a docker data container.
#!/bin/bash
# Run like so:
# docker-mongodump <mongo container name> <path to backups>
MONGO_CONTAINER=$1
BACKUPS_PATH=$2
DAY=`/bin/date +%Y%m%d`
PAST_DAY=`/bin/date -d '3 days ago' +%Y%m%d`
/*
BSD 3-Clause License
Copyright (c) 2002-2021, Lawrence Livermore National Security and Southern Methodist University.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
@balos1
balos1 / mips.sty
Created February 7, 2017 02:33
Package for mips highlighting in LaTex.
% MIPS Assembly language definition for the LaTeX `listings' package
%
% The list of instructions and directives are those understood by the
% MARS MIPS Simulator [http://courses.missouristate.edu/KenVollmar/MARS/]
%
% Author: Eric Walkingshaw <eric@walkingshaw.net>
%
% This code is in the public domain.
%
% Here is an example style. I like it for slides, but you might want
@balos1
balos1 / timing.h
Last active March 7, 2023 13:14
C/C++ macro for timing blocks of code
/*
File: timing.h
Author(s):
Cody Balos
Description:
Useful stuff for timing programs.
MIT License
Copyright (c) [2017] [Cody Balos]
@balos1
balos1 / lab_report.tex
Last active May 25, 2023 09:11
A Lab Report LaTex Template
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% University/School Laboratory Report
% LaTeX Template
% Version 3.1 (25/3/14)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Linux and Unix Users Group at Virginia Tech Wiki