Skip to content

Instantly share code, notes, and snippets.

View MattBroyles's full-sized avatar

Matt Broyles MattBroyles

  • Huntsville, Alabama
View GitHub Profile
// stolen with love from http://stackoverflow.com/questions/842465/reading-a-line-from-a-streamreader-without-consuming
public class PeekableStreamReaderAdapter
{
private StreamReader Underlying;
private Queue<string> BufferedLines;
public PeekableStreamReaderAdapter(StreamReader underlying)
{
Underlying = underlying;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force
#IfWinActive ahk_class PX_WINDOW_CLASS
; keypress detection for enter
@MattBroyles
MattBroyles / VS-SaveOnEnter.ahk
Last active September 6, 2018 10:57
This is a simple AutoHotKey script that will auto-save Visual Studio on every press of the enter key.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force
; Target only Visual Studio
SetTitleMatchMode, 2
#IfWinActive Microsoft Visual Studio
@MattBroyles
MattBroyles / VS-SaveOnSemicolon.ahk
Last active February 3, 2016 20:28
This is a simple AutoHotKey script that will auto-save your Visual Studio Solution every time you hit the semicolon key.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance Force
; Target only Visual Studio
SetTitleMatchMode, 2
#IfWinActive Microsoft Visual Studio
@MattBroyles
MattBroyles / Linux Static IP
Created October 13, 2015 03:59 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static