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 Kill-VisualStudio | |
{ | |
<# | |
.SYNOPSIS | |
Kills all running 'devenv' instances. | |
#> | |
Get-Process devenv -ErrorAction SilentlyContinue | Stop-Process | |
} | |
Set-Alias killvs Kill-VisualStudio |
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
# Taken from psake https://github.com/psake/psake | |
<# | |
.SYNOPSIS | |
This is a helper function that runs a scriptblock and checks the PS variable $lastexitcode | |
to see if an error occcured. If an error is detected then an exception is thrown. | |
This function allows you to run command-line programs without having to | |
explicitly check the $lastexitcode variable. | |
.EXAMPLE |
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
var $form = $('.item').closest('form'); |
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
var grid = new Slick.Grid(...); | |
grid.onClick.subscribe(function (e, args) { | |
// args: | |
// - cell | |
// - grid | |
// - row | |
var dataItem = args.grid.getDataItem(args.row); |
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 Edit-XmlNodes { | |
param ( | |
[xml] $doc = $(throw "doc is a required parameter"), | |
[string] $xpath = $(throw "xpath is a required parameter"), | |
[string] $value = $(throw "value is a required parameter"), | |
[bool] $condition = $true | |
) | |
if ($condition -eq $true) { | |
$nodes = $doc.SelectNodes($xpath) | |
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
{ | |
"startedDateTime": "2012-05-16T11:57:32.161Z", | |
"time": 94, | |
"request": { | |
"method": "GET", | |
"url": "https://jabbr.rpxnow.com/signin/get_login_info?time=1337169452162", | |
"httpVersion": "HTTP/1.1", | |
"headers": [ | |
{ | |
"name": "Accept-Encoding", |
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
<!-- https://github.com/samuelclay/NewsBlur/commits/master.atom --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xml:lang="en-US"> | |
<id>tag:github.com,2008:/samuelclay/NewsBlur/commits/master</id> | |
<link type="text/html" rel="alternate" href="https://github.com/samuelclay/NewsBlur/commits/master"/> | |
<link type="application/atom+xml" rel="self" href="https://github.com/samuelclay/NewsBlur/commits/master.atom"/> | |
<title>Recent Commits to NewsBlur:master</title> | |
<updated>2012-05-03T19:09:36-07:00</updated> | |
<entry> |
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 | |
Converts files to the given encoding. | |
Matches the include pattern recursively under the given path. | |
.EXAMPLE | |
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8 | |
#> | |
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') { | |
$count = 0 |
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 class Person : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
private void NotifyPropertyChanged(String propertyName) | |
{ | |
if (PropertyChanged != null) | |
{ | |
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); | |
} |
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
package main | |
import "fmt" | |
// iota is reset to 0 at every const declaration | |
const ( | |
Zero = iota // within a const declaration, iota is incremented for every line | |
One // default value is set to iota, which is now 1 | |
Two = 2 // exlicitly set to 2 | |
TwoAgain // default value is set to iota, which is now 2 creating a duplicate 2 |