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
foreach ($app in (Get-WmiObject -Query "Select * from Win32_Product where name like 'Microsoft Visual Studio Professional %'")) { | |
Write-Host "Deleting $app.Name" | |
&"msiexec.exe" /norestart /q/x $app.IdentifyingNumber REMOVE=ALL | |
#$app.Uninstall() | |
} | |
foreach ($app in (Get-WmiObject -Query "Select * from Win32_Product where name like 'Microsoft SQL Server %'")) { | |
Write-Host "Deleting $app.Name" | |
&"msiexec.exe" /norestart /q/x $app.IdentifyingNumber REMOVE=ALL | |
#$app.Uninstall() |
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
public class TourYearInfo | |
{ | |
public int Year { get; set;} | |
public int TourCode {get; set;} | |
} | |
void Main() | |
{ | |
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
std::vector<std::string> findSimilarItems(std::vector<std::string> first, std::vector<std::string> second) | |
{ | |
std::vector<std::string> rv; | |
std::sort(first); | |
std::sort(second); | |
for (auto iter = first.begin(), auto iter2 = second.begin();;) | |
{ | |
if (*iter == *iter2) { |
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
void doSomething() | |
{ | |
int c = 1; | |
{ | |
int x = 2; | |
} | |
printf("%d", x); // x's scope has ended | |
} // c's scope has ended |
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
# Load all computer names from a text file into an array/list | |
$computers = Get-Content -path C:\users\brynet01\desktop\Computers.txt | |
# Loop over each computer name in the array/list | |
foreach ($computer in $computers) | |
{ | |
# Open a remote registry connection to the current value of $computer. This requires going into the .NET library | |
# The 'LocalMachine' bit specifies that the remote registry base should be HKLM | |
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $computer) | |
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
zks_hash = | |
JSON.parse(`aws --region #{node['region']} \ | |
ec2 describe-instances \ | |
--filters "Name=tag:Deploy,Values=zookeeper"`) | |
# Parse out all the IP addresses for the instances from the dict | |
# This is hideous due to the AWS JSON return format | |
zookeeper_urls = [] | |
zks_hash["Reservations"].each do |zk| | |
zk_ip = zk["Instances"][0]["NetworkInterfaces"][0]["PrivateIpAddress"] |
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
#r @"packages/FAKE/tools/FakeLib.dll" // include the FAKE library | |
open Fake | |
// Define our build output | |
let buildDir = "./build/" | |
Target "Clean" (fun _ -> | |
CleanDir buildDir | |
) |
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
*.tar.gz | |
*/.DS_Store | |
*.template | |
*.swp | |
venv | |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*.pem |
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
open System | |
open System.IO | |
open Fake | |
/// Specifies the parameters for running an Ivy request | |
type IvyRetrieveParams = | |
{ | |
JavaPath : string | |
JarPath : string | |
Host : 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
def third_party_exists?(repository, sub_package, path) | |
uri = URI.parse("https://artifactory.vistaprint.net/#{repository}/#{path}") | |
request = Net::HTTP::Head.new(uri.request_uri) | |
print 'request URI: ', uri.to_s, "\n" if ENV['DOC_DEVKIT_TRACE'] | |
print 'request hash: ', request.to_hash, "\n" if ENV['DOC_DEVKIT_TRACE'] | |
print "request body:\n", request.body, "\n\n" if ENV['DOC_DEVKIT_TRACE'] | |
response = get_http(uri).request(request) | |
print "\n" if ENV['DOC_DEVKIT_TRACE'] | |
print 'response hash: ', response.to_hash, "\n" if ENV['DOC_DEVKIT_TRACE'] | |
print 'response code: ', response.code, "\n" if ENV['DOC_DEVKIT_TRACE'] |
OlderNewer