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 java.util.ArrayList; | |
import java.util.List; | |
public class AvlTree<K extends Comparable<K>, V> { | |
private static class Node<K extends Comparable<K>, V> { | |
public K key; | |
public V value; | |
public Node left; | |
public Node right; | |
public int height; |
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 Patch-Version($pathToFile, $buildNumber) { | |
$versionFormat = "(\d+)\.(\d+)\.(\d+)\.(\d+)"; | |
$pathToTmpFile = $pathToFile + ".tmp"; | |
Get-Content $pathToFile | % { $_ -replace $versionFormat, ('$1.$2.' + $buildNumber + '.$4') } | Set-Content $pathToTmpFile | |
Move-Item $pathToTmpFile $pathToFile -force | |
} | |
Patch-Version $args[0] $args[1]; |
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
using System; | |
using System.Linq; | |
using Sprache; | |
namespace Trash | |
{ | |
public static class EntryPoint | |
{ | |
public static 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
:do { | |
:do { | |
/file remove "/ipsum.rsc"; | |
/file remove "/subnet.rsc"; | |
} on-error={} | |
:put "Downloading ipsum.rsc..."; | |
:do { | |
/tool fetch url="https://antifilter.download/list/ipsum.rsc" dst-path="/ipsum.rsc" | |
} on-error={ |
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
use strict; | |
use Net::IP; | |
my @ips = (); | |
my $result = shift @ARGV; | |
for(my $i = 0; $i < @ARGV; ++$i) { | |
open(my $in, $ARGV[$i]) or warn "Can't open $ARGV[$i]: $!"; | |
while (!eof($in)) { | |
defined(my $line = readline $in) or die "readline failed for $ARGV[$i]: $!"; |
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
:do { | |
:do { | |
/file remove "/total.rsc"; | |
} on-error={} | |
:put "Downloading total.rsc..."; | |
:do { | |
/tool fetch address=/*address*/ src-path=total.rsc dst-path="/total.rsc" mode=tftp keep-result=yes | |
} on-error={ | |
:put "Error. Download failed"; |
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
#!/bin/bash | |
cd /root/blacklist | |
wget -N https://antifilter.download/list/ipsum.lst https://antifilter.download/list/subnet.lst; | |
./merge.pl total.lst ipsum.lst subnet.lst; | |
cat total.lst | sed 's/\(^\)/\/ip firewall address-list add list=rkn address=/g' > total.rsc; | |
cp total.rsc /var/lib/tftpboot/; | |
logger "total.rsc was updated"; |
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
services: | |
rabbit_1: &rmq | |
image: rabbitmq:management | |
hostname: rabbit_1 | |
ports: | |
- "15673:15672" | |
- "5673:5672" | |
environment: | |
- RABBITMQ_ERLANG_COOKIE='mysecret' | |
healthcheck: |