sudo apt-get update && sudo apt-get upgrade
sudo apt-get install virtualenv libjpeg-dev libxml2-dev libxslt1-dev
$file = "C:\tmp\test.csv" | |
$content = Get-Content -Path $file # -Delimiter "," | |
$noOfColumns = 0 | |
$noOfRows = $content.Count # -1 # Remove header row | |
foreach ($line in $content) | |
{ | |
$occurs = Select-String -InputObject $line -Pattern "," -AllMatches | |
$noOfOccurs = $occurs.Matches.Count + 1 | |
if ($noOfOccurs -gt $noOfColumns) | |
{ |
System.IO.IOException: The write operation failed, see inner exception. ---> System.Net.Http.WinHttpException: The connection with the server was terminated abnormally | |
--- End of inner exception stack trace --- | |
at Amazon.Runtime.HttpWebRequestMessage.<GetResponseAsync>d__20.MoveNext() in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\HttpHandler\_mobile\HttpRequestMessageFactory.cs:line 432 | |
--- End of stack trace from previous location where exception was thrown --- | |
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) | |
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) | |
at Amazon.Runtime.Internal.HttpHandler`1.<InvokeAsync>d__9`1.MoveNext() in E:\JenkinsWorkspaces\v3-stage-release\AWSDotNetPublic\sdk\src\Core\Amazon.Runtime\Pipeline\HttpHandler\HttpHandler.cs:line 175 | |
--- End of stack trace from previous location where exception was thrown --- | |
at System.Runtime.CompilerServices.Ta |
variable "environment" { | |
description = "this environment" | |
default = "poc1" | |
} | |
resource "digitalocean_droplet" "web" { | |
name = "web-1-${var.environment}" | |
size = "512mb" | |
image = "ubuntu-14-04-x64" | |
region = "lon1" |
$v1 | |
$v2 | |
Function GetJson($value1, $value2) | |
{ | |
$j = @{"test"=$value1;"test2"=$value2} | ConvertTo-Json | |
return $j | |
} | |
$v1 = "test123" |
RegionName | RegionCode | |
---|---|---|
US East (Ohio) | us-east-2 | |
US East (N. Virginia) | us-east-1 | |
US West (N. California) | us-west-1 | |
US West (Oregon) | us-west-2 | |
Canada (Central) | ca-central-1 | |
Asia Pacific (Mumbai) | ap-south-1 | |
Asia Pacific (Seoul) | ap-northeast-2 | |
Asia Pacific (Singapore) | ap-southeast-1 | |
Asia Pacific (Sydney) | ap-southeast-2 |
# Remove cruddy default apps | |
Get-AppxPackage Microsoft.XboxIdentityProvider | Remove-AppxPackage | |
#Get-AppxPackage Microsoft.XboxGameCallableUI | Remove-AppxPackage | |
Get-AppxPackage Microsoft.MicrosoftStickyNotes | Remove-AppxPackage | |
Get-AppxPackage Microsoft.BingWeather | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsCamera | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsAlarms | Remove-AppxPackage | |
Get-AppxPackage Microsoft.WindowsSoundRecorder | Remove-AppxPackage | |
Get-AppxPackage Microsoft.People | Remove-AppxPackage |
$r = Invoke-WebRequest -Uri 'https://fsrm.experiant.ca/api/v1/combined' -Method GET |
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" SMB1 -Type DWORD -Value 0 -Force |
$api_key = 'PUT YOUR API KEY HERE' | |
$baseApiUrl = 'api.civo.com' | |
$apiVer = 'v2' | |
$apiUrl = "https://$baseApiUrl/$apiVer" | |
$header = @{} | |
$header.add("Authorization", "bearer $api_key") | |
#$header.add("Content-Type", "application/json") | |
$id = "wp-ubuntu" |