powershell
check some object Property just show one two three ... you want see all values just code
stuff |Select-Object –ExpandProperty YouwantProperty
typedef enum { | |
ssfALTSTARTUP = 0x1d, | |
ssfAPPDATA = 0x1a, | |
ssfBITBUCKET = 0x0a, | |
ssfCOMMONALTSTARTUP = 0x1e, | |
ssfCOMMONAPPDATA = 0x23, | |
ssfCOMMONDESKTOPDIR = 0x19, | |
ssfCOMMONFAVORITES = 0x1f, | |
ssfCOMMONPROGRAMS = 0x17, | |
ssfCOMMONSTARTMENU = 0x16, |
Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies. | |
Package Manager Console Host Version 2.0.30619.9119 | |
Type 'get-help NuGet' to see all available NuGet commands. | |
PM> |
Each package is licensed to you by its owner. Microsoft is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies. | |
Package Manager Console Host Version 2.0.30619.9119 | |
Type 'get-help NuGet' to see all available NuGet commands. | |
PM> |
//Copy from [email protected] 15 Aug 2006 8:29 PM | |
using System; | |
using System.CodeDom; | |
using System.CodeDom.Compiler; | |
using Microsoft.CSharp; | |
using Microsoft.VisualBasic; | |
using System.IO; | |
namespace ConsoleApplication1 | |
{ |
copy from http://msdn.microsoft.com/en-us/library/fs2xkftw(v=vs.110) | |
using System; | |
using System.IO; | |
class Program | |
{ | |
static void Main() | |
{ | |
try |
//Example of a model that won't work with the current JsonValueProviderFactory but will work with JsonDotNetValueProviderFactory | |
public class CmsViewModel | |
{ | |
public bool IsVisible { get; set; } | |
public string Content { get; set; } | |
public DateTime Modified { get; set; } | |
public DateTime Created { get; set; } | |
//This property will not work with the current JsonValueProviderFactory | |
public dynamic UserDefined { get; set; } | |
} |
powershell
check some object Property just show one two three ... you want see all values just code
stuff |Select-Object –ExpandProperty YouwantProperty
//This returns a 404 not found - powershell; I expected a 401 if my creds were bad | |
$Url = "https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26" | |
$webclient = new-object system.net.webclient | |
$webclient.credentials = new-object system.net.networkcredential("user", "password") | |
$result = $webclient.DownloadString($Url) | |
$result | |
//This returns the data I want via terminal | |
curl -u user:password https://github.com/api/v2/xml/commits/list/fellowshiptech/portal/Portal_2011.6.23_15-26 |
# ask the user for a gist name | |
param ( | |
[string]$gistname = "$(Read-Host 'Enter a name for the gist')" | |
) | |
# constant | |
$gistapi = "https://api.github.com/gists" | |
$filename = $gistname + '.diff' | |
$teststring = "`{`"description`": `"the description for this gist`",`"public`": true,`"files`": `{`"file1.txt`": `{`"content`": `"String file contents`"`}`}`}" | |
# get the diff from the current session |
function Get-ChildItemColor { | |
<# | |
.Synopsis | |
Returns childitems with colors by type. | |
.Description | |
This function wraps Get-ChildItem and tries to output the results | |
color-coded by type: | |
Compressed - Yellow | |
Directories - Dark Cyan |