Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthew Reschke mreschke

  • Sunfinity Renewable Energy
  • Grand Junction, CO
View GitHub Profile
View clean_old_files.sh
#!/usr/bin/env python
# Clean up old files around the server, called weekly Sunday 8am
# mReschke 2012-05-01
import os
import sys
import subprocess
import traceback
import datetime
@mreschke
mreschke / .xinitrc
Created Nov 13, 2015
Great .xinitrc
View .xinitrc
######################################################################################################
## mReschke .xinitrc/.xsession X11 control file ##
## See http://fluxbox.sourceforge.net/docbook/en/html/app-setup.html for help on .xinitrc/.xsession ##
######################################################################################################
## Run before window manager loads ##
# Fix to make QT apps look like GTK theme
GTK2_RC_FILES="$HOME/.gtkrc-2.0"
@mreschke
mreschke / xmonad.hs
Created Nov 13, 2015
xmonad.hs config file for nice blue xmonad
View xmonad.hs
-------------------------------------------------------------------------------
-- xmonad.hs
-- Taken from default config + Mr.Elendigs file + mReschke Custom Additions
-------------------------------------------------------------------------------
-- Compiler flags --
{-# LANGUAGE NoMonomorphismRestriction #-}
-- Imports --
-- stuff
import XMonad
@mreschke
mreschke / .xmobarrc
Created Nov 13, 2015
xmobarrc for nice blue xmonad
View .xmobarrc
Config { font = "-*-terminus-*-*-*-*-12-*-*-*-*-*-*-u"
, bgColor = "#000000"
, fgColor = "#1793D1"
, position = TopSize L 100 16
, lowerOnStart = True
, commands = [ Run Network "eth0" ["-L", "64", "-H", "128", "-l", "#8Dc342", "-n", "#D07735" ,"-h", "#cc2000", "-t", "<dev>: <rx> : <tx>"] 10
, Run Cpu ["-L","25", "-H","50", "-l", "#8DC342", "-n","#D07735", "-h","#cc2000"] 10
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Date "%a %b %_d %Y %I:%M:%S" "date" 10
, Run CoreTemp ["-t", "Temp: <core0>C : <core1>C : <core2>C : <core3>C"] 10
@mreschke
mreschke / dmenu_run
Created Nov 13, 2015
dmenu_run script with nice blue colors
View dmenu_run
#!/bin/bash
# Dmenu run with nice blue colors
# mReschke 2012
exe=`dmenu_path | /usr/bin/dmenu_run -nb '#020A1C' -nf '#186b9f' -sb '#020A1C' -sf '#ffffff'` && eval "exec $exe"
@mreschke
mreschke / nginx-new-site
Last active Nov 6, 2015
Create a new nginx php-fpm site
View nginx-new-site
#!/usr/bin/env bash
# Create a new nginx php-fpm site
# mReschke 2015-01-01
if [ "$1" == "" -o "$2" == "" ]; then
echo "Usage: serve url.example.com /var/www/example/public"
exit 1
fi
@mreschke
mreschke / md5compare
Created Nov 6, 2015
Compare md5sums of all files between two directories
View md5compare
#!/bin/bash
#Compare md5sums of all files between two directories
#mReschke 2012-06-14
src=$1
dest=$2
if [ "$src" != "" -a "$dest" != "" ]; then
if [ -e "$src" -a -e "$dest" ]; then
@mreschke
mreschke / mrcore5-dynatron-setup.sh
Last active Nov 5, 2015
Configure mrcore5 to my dynatron liking
View mrcore5-dynatron-setup.sh
#!/bin/bash
# Setup mrcore5 to my (mreschke) personal dbox liking (including dynatron code)a
# Run from inside dbox php shell
# Be sure you have proper github ssh keys in the php container, test first
# mReschke 2015-11-04
@mreschke
mreschke / secret-file
Last active Aug 29, 2015
Create, Edit, Search and List a single GPG encrypted file
View secret-file
#!/bin/bash
# Create, Edit, Search and List a single GPG encrypted file
# Copyright (C) 2014 Matthew Reschke
# License MIT <mreschke.com/license/mit>
# Written by Matthew Reschke <mreschke.com/me> 2014-01-24
file="$1"
option="$2"