Skip to content

Instantly share code, notes, and snippets.

View hmcclungiii's full-sized avatar
👨‍💻
Available for Hire

Houston McClung hmcclungiii

👨‍💻
Available for Hire
View GitHub Profile
@hmcclungiii
hmcclungiii / browserwrapper.cs
Last active September 27, 2021 23:57
C# Webbrowser Wrapper Control, used to be able to wait until a page completely loads prior to taking action on it. For web automation projects.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
public partial class browserwrapper : System.Windows.Forms.WebBrowser
{
@hmcclungiii
hmcclungiii / clean.bat
Created March 12, 2014 04:51
Simple little batch file that I use to delete unneeded files that are generated at compile time.
@echo off
FOR /D /R %%X IN (debug,release,bin,obj,ipch) DO RD /S /Q "%%X"
del /S /F /AH *.suo
del /S /F *.user
del /S /F *.ncb
del /S /F *.sbr
del /S /F *.log
@hmcclungiii
hmcclungiii / FileHandler.cs
Last active October 12, 2022 05:26
Code template/model for (de)serializing an object to/from an XML file.
using System;
using System.ComponentModel;
using System.Xml.Schema;
using System.Xml.Serialization;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
namespace XmlFile
{
@hmcclungiii
hmcclungiii / gist:9924148
Created April 1, 2014 22:10
Remove any non-numeric characters from a string.
string newValue = System.Text.RegularExpressions.Regex.Replace(oldValue, "[^.0-9]", "");
@hmcclungiii
hmcclungiii / eventpattern.cs
Created April 14, 2014 07:25
C# Event Pattern
namespace eventpattern {
public delegate void AllPropertiesDetailsParsedEventHandler(object sender, AllPropertiesDetailsParsedEventArgs e);
public class AllPropertiesDetailsParsedEventArgs : EventArgs
{
}
public partial class Controller
{
public event AllPropertiesDetailsParsedEventHandler AllPropertiesDetailsParsed;
@hmcclungiii
hmcclungiii / AlternatingExcelRows
Created July 27, 2014 04:17
To alternate row colors in Excel ...
Select a range of cells to format ...
Click Conditional Formatting - Click New Rule
For the rule, enter this ...
=MOD(ROW(),2)=1
Click the format button and select your formatting.
Click OK twice and there you go!
@hmcclungiii
hmcclungiii / button.css
Created March 19, 2015 21:43
A nice clickable button in css.
.button {
-webkit-border-radius: 10;
-webkit-box-shadow: 0px 1px 3px #666666;
-moz-border-radius: 10;
-moz-box-shadow: 0px 1px 3px #666666;
background: #F97878;
border-radius: 10px;
box-shadow: 0px 1px 3px #666666;
color: #ffffff;
font-family: Arial;
@hmcclungiii
hmcclungiii / border.css
Created March 20, 2015 19:07
CSS to add borders to any box element.
.borders {
-webkit-box-shadow: 0px 1px 3px #666666;
-moz-box-shadow: 0px 1px 3px #666666;
box-shadow: 0px 1px 3px #666666;
-webkit-border-radius: 10;
-moz-border-radius: 10;
border-radius: 10px;
}
<div class="container1"></div>
<div class="container2 zigzag"></div>
<div class="container3 zigzag"></div>
<div class="container4 zigzag"></div>
/* Zig-Zag Border
Credit to http://bradsknutson.com/blog/css-zig-zag-border/
*/
.container1 {
width: 100%;
@hmcclungiii
hmcclungiii / functions.php
Created January 19, 2016 20:02
Adds a custom stylesheet to your WordPress Login Page.
<?php
/* You can remove the above opening php tag
when pasting this code inside your
functions.php file.
*/
/* The following code adds your custom stylesheet
to the wordpress login screen, allowing you to
customize the background, colors and fonts of the
page to match your custom theme.