#Ladda ner
git clone git://git.drogon.net/wiringPi
#Kompilera
cd wiringPi
./build
$postSlackMessage = @{token="*topsecret*";channel="#general";text="Hello from PowerShell!";username="PowerShell";icon_url="https://pbs.twimg.com/profile_images/1604347359/logo_512x512_normal.png"} | |
Invoke-RestMethod -Uri https://slack.com/api/chat.postMessage -Body $postSlackMessage |
$owner = "repo owner" | |
$body = @{type="POST";URL="slack hook"} | |
$cred=Get-Credential | |
$repos = Invoke-RestMethod -Credential $cred -Uri 'https://api.bitbucket.org/1.0/user/repositories/' | |
#All repos | |
$repos |Where-Object {$_.owner -eq $owner} | %{$uri="https://bitbucket.org/api$($_.resource_uri)/services/";Invoke-RestMethod -Uri $uri -Body $body -Method Post -Credential $cred} | |
#Filter repos | |
$repos |Where-Object {$_.owner -eq $owner -and $_.resource_uri -like "*needle*" } | %{$uri="https://bitbucket.org/api$($_.resource_uri)/services/";Invoke-RestMethod -Uri $uri -Body $body -Method Post -Credential $cred} |
gci -Directory -Recurse .git -Hidden|%{pushd;cd (Split-Path -Parent $_);(git remote -v)-split "`n"|%{$r=$_ -split "`t| ";iex "git remote set-url $(if($r[2]-eq"(push)"){"--push "})$($r[0]) $($r[1]-replace ("John","Doe"))"} ;popd} |
#Ladda ner
git clone git://git.drogon.net/wiringPi
#Kompilera
cd wiringPi
./build
$(Invoke-RestMethod -Uri http://channel9.msdn.com/Shows/Windows-Azure-Friday/feed/mp4high)|%{$pattern = "[{0}]" -f ([Regex]::Escape( [System.IO.Path]::GetInvalidFileNameChars() -join '' )); @{ FileName = [RegEx]::Replace($_.title + ".mp4", $pattern, ''); Url=@($_.group.content.url |sls high.mp4)[0].ToString()} }|%{if(!(Test-Path -Path $_.FileName )){Invoke-WebRequest -Uri $_.Url -OutFile $_.FileName}} |
using System; | |
using System.Collections.Generic; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.Caching; | |
using System.Web.Mvc; | |
using Microsoft.AspNet.Identity; | |
using FileDownloadSecurityIdeas.Models; |