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
package excercises | |
abstract class MyList { | |
def head(): Int | |
def tail(): MyList | |
def isEmpty: Boolean | |
def add(element: Int): MyList | |
def printElements: String |
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
package org.apache.beam.examples.streams; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import java.io.IOException; | |
import java.io.Serializable; | |
import java.util.Arrays; | |
import java.util.Objects; | |
import org.apache.beam.sdk.coders.StringUtf8Coder; | |
import org.apache.beam.sdk.testing.PAssert; | |
import org.apache.beam.sdk.testing.TestPipeline; |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
"time" | |
consulapi "github.com/hashicorp/consul/api" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
import scala.io.Source | |
import sys.process._ | |
import java.net.URL | |
import java.io.File | |
Source.fromFile("name_of_file_that_contains_list_of_urls.txt") | |
.getLines | |
.zipWithIndex | |
.foreach { case(line, count) => new URL(line) #> new File(s"output_file_name_$count.txt") !! } |
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
function EnsureAdminPrivileges([String]$mesageOnError) | |
{ | |
$identity = [Security.Principal.WindowsIdentity]::GetCurrent() | |
$principal = new-object Security.Principal.WindowsPrincipal $identity | |
if (!($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) | |
{ | |
Write-Error $mesageOnError | |
throw | |
} | |
} |
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
param( | |
[int]$SecretArrayLength = 64 | |
) | |
$randomNumberGenerator = [System.Security.Cryptography.RandomNumberGenerator]::Create(); | |
$ba = [Byte[]] (,0 * $SecretArrayLength); | |
$randomNumberGenerator.GetBytes($ba, 0, $SecretArrayLength); | |
return [System.Convert]::ToBase64String($ba); |
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
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install sourcetree -y | |
choco install google-chrome-x64 -y | |
choco install notepadplusplus -y | |
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
$msdeploy = "$env:ProgramFiles\IIS\Microsoft Web Deploy V3\msdeploy.exe" | |
##Get this values from publish profile | |
$publishUrl="" | |
$msdeploySite="" | |
$userName="" | |
$userPWD="" | |
$computerNameParams = ",computername=`"https://$publishUrl/msdeploy.axd?site=$msdeploySite`",userName='$userName',password='$userPWD',AuthType='Basic'" | |
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
<# | |
TODO: | |
1. Make the script to run itself with elevated permissions. Otherwise it can't open certificate store. | |
2. Take the certificate from some public place. Let's say blob. | |
#> | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$True)] | |
[ValidateScript({ |
NewerOlder