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
| ' Steps to create: | |
| ' 1. Turn on the "developer" tab in the ribbon. | |
| ' 2. Copy some cell to the clipboard. | |
| ' 3. Click into an empty cell. | |
| ' 4. Click "record macro" on the developer tab. | |
| ' 5. Name it "PasteVFC" and choose to store it in "Personal Macro Workbook" (important) | |
| ' 6. Click "paste special" and choose "values & formats" | |
| ' 7. In the same cell, click "paste special" and choose "comments" | |
| ' 8. Click "stop recording" on the developer tab | |
| ' 9. Click "Visual Basic" on the developer tab and the macro code *should* look like below |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Globalization; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| using System.Runtime.Serialization; | |
| using System.Text; | |
| using System.Text.RegularExpressions; |
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
| public sealed class DynamicMatch : DynamicObject | |
| { | |
| private readonly Regex _Regex; | |
| private readonly Match _Match; | |
| public DynamicMatch( Regex regex, Match match ) | |
| { | |
| Contract.Requires( regex != null, "Regex cannot be null." ); |
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-Module ActiveDirectory | |
| # Get all of the computer names in active directory. | |
| # Displays a progress bar as each computer is queried for | |
| # the state of its hard drives using WMI. | |
| # The Status parameter selects the computer name to display | |
| # in the progress message. | |
| Get-ADComputer -Filter * | | |
| Measure-Progress -Status { $_.Name } { |
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
| ' TRANSPOSEOILVENDORDATA.VB | |
| ' BY JOSH EINSTEIN | |
| ' | |
| ' This is an Excel VBA macro that transposes a contiguous range of selected cells in Excel | |
| ' and repeats the header rows. Created specifically for a friend of mine, so probably not | |
| ' generally useful. | |
| ' INSTRUCTIONS | |
| ' To use, select a rectangular range of cells containing the table that you want to transpose. | |
| ' The first row should include the header values across that you want to be repeated |
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
| // Handle back button issues with Twitter Bootstrap's tab component. | |
| // Based on: http://stackoverflow.com/a/10120221/81769 | |
| // It has been changed to avoid the following side effects: | |
| // - Switching tabs was being added to navigation history which is undesirable | |
| // (Worked around this by using location.replace instead of setting the hash property) | |
| // - Browser scroll position was lost due to fragment navigation | |
| // (Worked around this by converting #id values to #!id values before navigating.) | |
| $(document).ready(function () { | |
| if (location.hash.substr(0,2) == "#!") { |
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
| # Module manifest for module 'WolframAlpha' | |
| # Generated by: Josh Einstein | |
| # Generated on: 4/25/2013 | |
| @{ | |
| RootModule = 'WolframAlpha.psm1' | |
| ModuleVersion = '1.0' | |
| GUID = 'bddce958-afa6-46d5-baa4-a277e0f9ccc1' | |
| Author = 'Josh Einstein' |
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
| url="http://api.wolframalpha.com/v2/query" | |
| appid="YOUR APP ID" # get one at https://developer.wolframalpha.com/portal/apisignup.html | |
| query="$@" | |
| value="$(perl -MURI::Escape -e 'print uri_escape($ARGV[0]);' "$query")" | |
| echo "Computing: $query" | |
| curl -s -L -G -d "input=$value&appid=$appid&format=plaintext" $url >/tmp/wolfram-alpha.xml | |
| xsltproc ~/Scripts/wolf.xslt /tmp/wolfram-alpha.xml |
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
| ############################################################################## | |
| #.SYNOPSIS | |
| # Scans your Outlook rules (Outlook must be running) and disables any rules | |
| # whose name matches a specific pattern such as: | |
| # Move Stuff (Until 4/10/2013 5:00 PM) | |
| # Ignore Stuff (Until 4/11/2013) | |
| # | |
| #.DESCRIPTION | |
| # | |
| # To create temporary rules in Outlook, just create rules as you would |
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
| <table id="people"> | |
| <thead> | |
| <th>First Name</th> | |
| <th>Last Name</th> | |
| <th>Phone Number</th> | |
| <th>Location</th> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td><input /></td> |