This file contains 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
<#PSScriptInfo | |
.VERSION 1.3 | |
.AUTHOR jongalloway@gmail.com | |
.GUID da220b4e-e889-42dc-85cd-91e0f91a965e | |
.PROJECTURI https://gist.github.com/jongalloway/935780 | |
.RELEASENOTES | |
1.2 adds regular expression title match (thanks, @meavk) | |
1.3 adds check for / at end of RSS URL | |
#> |
This file contains 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
//Source: Last comment at http://lozanotek.com/blog/archive/2007/07/22/Using_The_Windows_Live_Writer_API_To_Retrieve_Your_Blog_Password.aspx | |
using System; | |
using Microsoft.Win32; | |
// Add a ref to C:\Program Files\Windows Live\Writer\WindowsLive.Writer.BlogClient.dll | |
using WindowsLive.Writer.BlogClient; | |
// Add a ref to C:\Program Files\Windows Live\Writer\WindowsLive.Writer.CoreServices.dll | |
using WindowsLive.Writer.CoreServices.Settings; | |
using WindowsLive.Writer.CoreServices; |
This file contains 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.Diagnostics; | |
using System.Net; | |
namespace ConsoleApplication1 { | |
internal class Program { | |
private const int COUNT = 20; | |
private static void Main() { | |
var urls = new[] { |
This file contains 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.IO; | |
using System.Reflection; | |
using System.Web.Mvc; | |
using Mono.CSharp; | |
using System; | |
namespace DynamicModelCompilation.Controllers | |
{ | |
public class HomeController : Controller | |
{ |
This file contains 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
USE MYAWESOMEDATABASE | |
GO | |
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME= 'Audit') | |
CREATE TABLE Audit | |
( | |
AuditID [int]IDENTITY(1,1) NOT NULL, | |
Type char(1), | |
TableName varchar(128), | |
PrimaryKeyField varchar(1000), |
This file contains 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
# --- settings --- | |
$feedUrlBase = "http://go.microsoft.com/fwlink/?LinkID=206669" | |
# the rest will be params when converting to funclet | |
$latest = $true | |
$overwrite = $false | |
$top = 500 #use $top = $null to grab all | |
$destinationDirectory = join-path ([Environment]::GetFolderPath("MyDocuments")) "NuGetLocal" | |
# --- locals --- | |
$webClient = New-Object System.Net.WebClient |
This file contains 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
# --- settings --- | |
$feedUrlBase = "http://go.microsoft.com/fwlink/?LinkID=206669" | |
# the rest will be params when converting to funclet | |
$latest = $true | |
$overwrite = $false | |
$top = 5000 #use $top = $null to grab all | |
$destinationDirectory = join-path ([Environment]::GetFolderPath("MyDocuments")) "NuGetLocal" | |
# --- locals --- | |
$webClient = New-Object System.Net.WebClient |
This file contains 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
$find = 'jquery-1\.4\.4' | |
$replace = 'jquery-1\.5\.1' | |
$match = '*.cshtml' , '*.vbhtml' | |
$preview = $true | |
foreach ($sc in dir -recurse -include $match | where { test-path $_.fullname -pathtype leaf} ) { | |
select-string -path $sc -pattern $find | |
if (!$preview) { | |
(get-content $sc) | foreach-object { $_ -replace $find, $replace } | set-content $sc | |
} |
This file contains 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
<?php | |
/** | |
* RSS2 Feed Template for displaying RSS2 Posts feed. | |
* | |
* @package WordPress | |
*/ | |
header('Content-Type: ' . feed_content_type('rss-http') . '; charset=' . get_option('blog_charset'), true); | |
$more = 1; |
This file contains 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
if not "%*" =="" SET args = "-argumentlist \"%*\" | |
powershell -command "start-process -filepath \"..\lib\sublimetext2.2.0.2165\tools\sublime_text.exe\" %args%" |
OlderNewer