Skip to content

Instantly share code, notes, and snippets.

Mike Mueller mmueller

Block or report user

Report or block mmueller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am mmueller on github.
  • I am mmueller (https://keybase.io/mmueller) on keybase.
  • I have a public key ASDWvGmsEouJwKrSYBEb6yQc_E38VfPppQ6155E6AkzcOQo

To claim this, I am signing this object:

@mmueller
mmueller / git
Last active Nov 7, 2017
This is a bash script that wraps git and lets you implement pre- or post-command hooks that apply to git globally (not per-repository). Out of the box, this script has a post_clone and post_init hook that do the same thing: prompt you to verify that the author information (user.name and user.email) are correct for the given repository -- prevent…
View git
#!/bin/bash
#
# This script wraps git, so install it somewhere such as ~/bin where
# it will be found by your shell before the actual git executable.
set -e
# Extract the command from a git command line
function get_command {
while [[ "$1" =~ ^- ]]; do
@mmueller
mmueller / nvidia_brightness_watcher.py
Last active Aug 31, 2016
This is an ugly-ass hack to temporarily fix a brightness jumping problem with some nvidia-based laptops on Linux, until nvidiabl/nvidia drivers fix the issue. Watches the actual brightness of the display, and when it jumps up past the maximum, resets it to the original desired value.
View nvidia_brightness_watcher.py
#!/usr/bin/env python
import os
import time
BACKLIGHT = 'nvidia_backlight'
DELAY = 0.2
def get_value(name):
path = os.path.join('/sys/class/backlight', BACKLIGHT, name)
@mmueller
mmueller / bitly.py
Created Apr 28, 2011
Command-line bit.ly URL generator (Python)
View bitly.py
#!/usr/bin/env python
#
# Copyright 2009 Empeeric LTD. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
You can’t perform that action at this time.