This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Regular Expressions List | |
//Short Tutorial | |
\ // the escape character - used to find an instance of a metacharacter like a period, brackets, etc. | |
. // match any character except newline | |
x // match any instance of x | |
^x // match any character except x | |
[x] // match any instance of x in the bracketed range - [abxyz] will match any instance of a, b, x, y, or z | |
| // an OR operator - [x|y] will match an instance of x or y |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Import-Excel { | |
<# | |
.SYNOPSIS | |
Creates table-like custom objects from the items in a Excel file. | |
Requires Excel be installed! | |
.DESCRIPTION | |
The Import-Excel cmdlet creates table-like custom objects from the items in Excel | |
Worksheets. | |
Each column in the Excel Worksheet becomes a property of the custom object and the items in | |
rows become the property values. Import-Excel works on any file supported by Excel. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- SQL Server Dynamic Pivot Demo | |
-- Disclaimer | |
-- Part of this script is based on PIVOT samples I found somewhere on the net, | |
-- though most of this is my own work. | |
------------------------------------------------------------------------ | |
-- FIRST PHASE: Set up demo data in a table called dbo.MonthlySales | |
------------------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Originally published at https://gist.github.com/nzthiago/5736907 | |
# I Customized it for SPC14 with slides | |
# If you like it, leave me a comment | |
# If you don't like it, complain to Github. :) | |
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
# Grab the RSS feed for the MP4 downloads |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[string]$searchPath = "", | |
[string]$puttySession = "", | |
[string]$destPath = "" | |
) | |
# | |
# Init | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#h/t: http://tfl09.blogspot.com/2008/07/finding-your-external-ip-address-with.html | |
function getCurrentExternalIPAddress() { | |
$wc=New-Object net.webclient | |
$wc.downloadstring("http://checkip.dyndns.com") -replace "[^\d\.]" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports System.Runtime.CompilerServices | |
Imports System.Text | |
Public Module IDbCommandExtension | |
''' <summary> | |
''' Return DB command information | |
''' </summary> | |
''' <param name="source"></param> | |
''' <returns></returns> | |
''' <remarks></remarks> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off installing the sweet goodness : Chocolatey | |
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin | |
'------------------------ usual user programs ---------------------- | |
@echo installing usual user stuff | |
@echo VLC player : something to watch movies with | |
cinst vlc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name capitalone | |
// @namespace kyle | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js | |
// @include https://servicing.capitalone.com/* | |
// @grant none | |
// ==/UserScript== | |
// | |
$(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import feedparser | |
from email.MIMEMultipart import MIMEMultipart | |
from email.MIMEText import MIMEText | |
import smtplib | |
import re | |
def getFeeds(rssfeed, regex=None): | |
feed_dict = {} | |
for feed in rssfeed.entries: |
NewerOlder