Skip to content

Instantly share code, notes, and snippets.

View jmbeach's full-sized avatar
🏠

Jared Beach jmbeach

🏠
View GitHub Profile
This file has been truncated, but you can view the full file.
{
"_id" : ObjectId("5706ff815413d466678de3bd"),
"id" : "2489651057",
"type" : "WatchEvent",
"actor" : {
"id" : 6894991,
"login" : "SametSisartenep",
"gravatar_id" : "",
"url" : "https://api.github.com/users/SametSisartenep",
@jmbeach
jmbeach / Create model class
Created June 6, 2016 13:20 — forked from eternnoir/Createmodelclass.sql
Create model class
declare @TableName sysname = 'TableName'
declare @Result varchar(max) = 'public class ' + @TableName + '
{'
select @Result = @Result + '
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }
'
from
(
select
@jmbeach
jmbeach / github-pandoc.css
Created June 9, 2016 20:57 — forked from dashed/github-pandoc.css
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@jmbeach
jmbeach / autohotkey_paste_date.ahk
Created June 24, 2016 14:24 — forked from JamoCA/autohotkey_paste_date.ahk
Autohotkey shortcuts to paste current date & time as either a 14 digit date hash (YYYYMMDDHHMMSS) or using formatting.
; Paste Date/time stamp as YYYYMMDDHHMMSS hash (Ctrl ;)
^;:: Send, %A_Now%
return
; Paste personally preferred formatted date/time stamp (Ctrl Shift ;)
^+;::
FormatTime,CurrentTime,%A_Now%,M/d/yyyy HH:mm:ss
Send, %CurrentTime%
return
@jmbeach
jmbeach / WebDriverInitialSetup
Created July 15, 2016 13:29
A basic setup for using Selenium with C#
using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenQA.Selenium;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Support.UI;
using System.Threading;
//TODO replace with your namespace
@jmbeach
jmbeach / set-ip.ps1
Created February 21, 2017 15:05
Powershell Set Static IP
function set-ip-static ([string]$ip, [string]$strMask, [string]$gateway, [string]$dns1, [string]$dns2, [string]$networkInterface) {
netsh interface ipv4 set address name=$networkInterface static $ip $strMask $gateway 1
netsh interface ipv4 delete dnsservers name=$networkInterface all validate=no
netsh interface ipv4 set dns name=$networkInterface static addr=$dns1 validate=no
netsh interface ipv4 add dnsservers name=$networkInterface addr=$dns2 index=2 validate=no
}
function set-ip-wi-example {
$ip = "192.168.201.25"
$strMask = "255.255.255.0"
@jmbeach
jmbeach / db-export-data.ps1
Created April 6, 2017 15:24
Export data from remote sql server database using powershell
function db-export-data() {
$Filepath='D:\DatabaseBackups' # local directory to save build-scripts to
$DataSource='MyServer' # server name and instance
$Database='MyDatabase'# the database to copy from
# set "Option Explicit" to catch subtle errors
set-psdebug -strict
$ErrorActionPreference = "stop" # you can opt to stagger on, bleeding, if an error occurs
# Load SMO assembly, and if we're running SQL 2008 DLLs load the SMOExtended and SQLWMIManagement libraries
$ms='Microsoft.SqlServer'
$v = [System.Reflection.Assembly]::LoadWithPartialName( "$ms.SMO")
@jmbeach
jmbeach / infragistics client paging.js
Created November 1, 2017 20:41
Infragistics Client Paging
function updatePaging() {
$find('<%=yourgrid.clientid%>').get_behaviors().get_paging().updatePager(
getPageSize(),
getPageIndex(),
getPageCount())
}
function getSequencePageCount() {
var count = getResultsCount() / getPageSize()
if (count <= 0=) {
@jmbeach
jmbeach / everything-winkey.ahk
Created November 20, 2017 17:51
Open the program "Everything" to search with Windows key
OpenEverything()
{
IfWinExist, Everything
{
WinActivate
return
}
Run, "C:\Program Files (x86)\Github\Wox\Everything\Everything.exe"
return
}
@jmbeach
jmbeach / wikia.css
Created March 23, 2018 19:04
wikia custom css
html,.mediawiki,.TSddqdlwwG {
width: 100%
;
}
.WikiaSiteWrapper {
background-image: none;
background-color: white;
margin-top: -55px;
width: 100%;