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( | |
[Parameter(Mandatory=$true)] | |
[string]$FileOwner, | |
[string]$Unlock | |
) | |
$Shares = Get-WmiObject -Class win32_share -filter "type=0 and not name like 'PRINT$' and not name like 'SYSVOL' and not name like 'NETLOGON'" | |
if ($Unlock) { | |
ForEach ($Share in $Shares) { | |
UnBlock-SmbShareAccess -Name $Share.Name -AccountName $FileOwner -force | |
} |
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
# sh /code/run.sh | |
[value] Analyzing a complete application starting at main | |
[value] Computing initial state | |
[value] Initial state computed | |
/code/src/test.c:59:[value] warning: argument version has type int but format indicates unsigned int | |
[value] warning: Continuing analysis because this seems innocuous | |
Test Argon2i version number: 13 | |
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
# Source | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct node { | |
int something; | |
struct node *next; | |
}; |
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
#!/usr/bin/env ruby | |
require 'openssl' | |
def subject_alt_name(domains) | |
domains = domains.split(/,/) | |
ef = OpenSSL::X509::ExtensionFactory.new | |
ef.create_extension("subjectAltName", | |
domains.map { |d| "DNS: #{d}" }.join(',')) |
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
#include <stdio.h> | |
#include <unistd.h> | |
int returnsnegative() { | |
return -5; | |
} | |
ssize_t my_write(int fd, const void *buf, size_t count) { | |
/* This functions has the same function prototype as write() */ | |
/* For more information: https://linux.die.net/man/2/write */ |
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
#!/usr/bin/env ruby | |
("1000000000".to_i(16)).upto("FFFFFFFFFF".to_i(16)) do |n| | |
puts n.to_s(16).upcase | |
puts n.to_s(16) | |
end |
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
$VMs = import-csv -path '.\build list.csv' | |
$VMLOC = "C:\ClusterStorage\GoldTier03\iuhuih\" | |
$ISO = "C:\ClusterStorage\SilverTier1\ISO\SW_DVD9_Win_Svr_STD_Core_and_DataCtr_Core_2016_64Bit_English_-3_MLF_X21-30350.ISO" | |
foreach ($vm in $VMs) { | |
write-host "Creating VM " $vm.Name "With C: " $vm.C "and ram" $vm.RAM | |
$disksize = [int]$($vm.C) * 1024*1024*1024 #Convert byte string to GB | |
New-VM -Name $vm.Name -Path ${VMLOC} -MemoryStartupBytes 2GB -NewVHDSizeBytes $disksize -SwitchName vSwitch1 -Generation 2 -NewVHDPath "$($VMLOC)$($vm.Name)\disk-1.vhdx" | |
Get-VM -VM $vm.Name | Set-VMNetworkAdapterVlan -Access -Vlanid 1205 | |
$ramsize = [int]$($vm.RAM) * 1024*1024*1014 #Convert byte string to GB |
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
dial.erl | |
-module(dial). | |
-export([dial/0]). | |
addthree(X) -> | |
X + 3. | |
dial() -> | |
Y = addthree(2), | |
io:fwrite("~p~n", [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
#!/usr/bin/env ruby | |
zones = `./cli53-linux-amd64 l --profile d53`.lines | |
zones.each do |zone| | |
domain = zone.split(/\s+/)[1] | |
`./cli53-linux-amd64 export #{domain} --profile d53 > #{domain}.zone` | |
puts domain | |
end |