Skip to content

Instantly share code, notes, and snippets.

View mreschke's full-sized avatar

Matthew Reschke mreschke

  • Grand Junction, CO
View GitHub Profile
@mreschke
mreschke / nginx.conf
Last active February 18, 2024 04:41
Nginx config for multiple laravel sites based on /api/v1 url paths
# This config will host your main [Laravel] GUI application at /, and any additional [Lumen] webservices at /api/v1 and /api/v2...
# This also works perfectly for all static file content in all projects
# This is full of debug comments so you can see how to print debug output to browser! Took me hours to nail this perfect config.
# Example:
# http://example.com - Main Laravel site as usual
# http://example.com/about - Main Laravel site about page as usual
# http://example.com/robots.txt - Main Laravel site static content as usual
# http://example.com/api/v1 - Lumen v1 api default / route
# http://example.com/api/v1/ - Lumen v1 api default / route
#!/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 November 13, 2015 22:55
Great .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 November 13, 2015 22:45
xmonad.hs config file for nice blue xmonad
-------------------------------------------------------------------------------
-- xmonad.hs
-- Taken from default config + Mr.Elendigs file + mReschke Custom Additions
-------------------------------------------------------------------------------
-- Compiler flags --
{-# LANGUAGE NoMonomorphismRestriction #-}
-- Imports --
-- stuff
import XMonad
@mreschke
mreschke / .xmobarrc
Created November 13, 2015 22:44
xmobarrc for nice blue xmonad
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 November 13, 2015 22:43
dmenu_run script with nice blue colors
#!/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 November 6, 2015 04:39
Create a new nginx php-fpm 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 November 6, 2015 03:03
Compare md5sums of all files between two directories
#!/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 November 5, 2015 00:42
Configure mrcore5 to my dynatron liking
#!/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 August 29, 2015 13:56
Create, Edit, Search and List a single GPG encrypted 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"