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
Get-DnsServerResourceRecord -ZoneName $zone -RRType A | Where-Object {$_.HostName.EndsWith("." + $sub)} | ForEach {Add-DnsServerResourceRecordA -ZoneName ($sub + "." + $zone) -Name $_.HostName.Remove($_.HostName.Length - 1 - $sub.Length) -IPv4Address $_.RecordData.IPv4Address -TimeToLive $_.TimeToLive -AllowUpdateAny -AgeRecord} | |
Get-DnsServerResourceRecord -ZoneName $zone -RRType CName | Where-Object {$_.HostName.EndsWith("." + $sub)} | ForEach {Add-DnsServerResourceRecordCName -ZoneName ($sub + "." + $zone) -Name $_.HostName.Remove($_.HostName.Length - 1 - $sub.Length) -HostNameAlias $_.RecordData.HostNameAlias -TimeToLive $_.TimeToLive} | |
Get-DnsServerResourceRecord -ZoneName $zone -RRType SRV | Where-Object {$_.HostName.EndsWith("." + $sub)} | ForEach {Add-DnsServerResourceRecord -Srv -ZoneName ($sub + "." + $zone) -Name $_.HostName.Remove($_.HostName.Length - 1 - $sub.Length) -DomainName $_.RecordData.DomainName -Port $_.RecordData.Port -TimeToLive $_.TimeToLive -Weight $_.RecordData.Weight -Priority $_.R |
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
-module(send_after_test). | |
-export([main/0]). | |
main() -> | |
Self = self(), | |
Ref = make_ref(), | |
spawn(fun() -> test(Self, Ref) end), | |
receive Ref -> ok 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
-module(binaries). | |
-export([by_char/2, whole/2, by_list/2, count/0]). | |
by_char(Rest, <<>>) -> | |
Rest; | |
by_char(<<C, String/binary>>, <<C, Pattern/binary>>) -> | |
by_char(String, Pattern); | |
by_char(_, _) -> | |
no_match. |
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
-module(close_bug). | |
-export([bad_ports/0, start/1]). | |
bad_ports() -> | |
[{P, element(2, erlang:port_info(P, connected))} || {P, {links, []}} <- [{P, erlang:port_info(P, links)} || P <- erlang:ports()]]. | |
opts() -> | |
[binary, {active, false}, {exit_on_close, false}, {packet, 1}, {nodelay, true}]. |
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 escript | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% erlasm | |
% A script to take erlang code from the command line and display the generated | |
% BEAM assembler. The passed-in code must consist of one or more complete | |
% functions. | |
% | |
main (Strings) -> | |
Asm = lists:flatten( |