This file contains hidden or 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
name = radiusd | |
prefix = "" | |
logdir = "/var/log/radius" | |
run_dir = "/var/run/radiusd" | |
libdir = "/usr/lib/freeradius" | |
debug_level = 2 | |
proxy_requests = no | |
raddbdir = "/etc/raddb" | |
certdir = "${raddbdir}/certs" |
This file contains hidden or 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 | |
cf_api_fetch() { | |
curl -s "https://api.cloudflare.com/client/v4/$1" \ | |
-H "X-Auth-Email: $CLOUDFLARE_EMAIL" \ | |
-H "X-Auth-Key: $CLOUDFLARE_API_KEY" \ | |
| jq -r "$2" | |
} | |
for zone_id in $(cf_api_fetch "zones" '.result[] | .id'); do |
This file contains hidden or 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 threading | |
import logging | |
from numpy.fft import fft, ifft | |
import numpy as np | |
import jack | |
def denoice(left, right): | |
fft_l = fft(left) |
This file contains hidden or 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 sys | |
import random | |
import requests | |
http = requests.Session() | |
http.cert = 'client.pem' | |
base_url = 'https://its-izba-4ncvjm8.spbctf.ru:13443' |
This file contains hidden or 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
from typing import TypeVar, Iterable, Generator, Callable, cast, Sequence | |
T = TypeVar('T', bound=Sequence) | |
def exact_size_chunks_iter( | |
chunks_iter: Iterable[T], | |
chunk_size: int, | |
concat: Callable[[Iterable[T]], T] = cast(Callable[[Iterable[T]], T], b''.join), |
This file contains hidden or 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 | |
ARCH="$(dpkg --print-architecture)" | |
CODENAME="$(. /etc/os-release && echo "$VERSION_CODENAME")" | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/docker.gpg | |
echo "deb [arch="$(dpkg --print-architecture)"] https://download.docker.com/linux/ubuntu \ | |
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" \ | |
> /etc/apt/sources.list.d/docker.list |
This file contains hidden or 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
[sources.journald] | |
type = "journald" | |
[transforms.remove_systemd_fields] | |
type = "remap" | |
inputs = ["journald"] | |
source = ''' | |
del(._BOOT_ID) | |
del(._CAP_EFFECTIVE) | |
del(._CMDLINE) |
This file contains hidden or 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 mmap | |
from PIL import Image | |
import numpy as np | |
size = 32 * 32 * 4 | |
f = open('f.bin', 'w+b') | |
f.truncate(size) | |
mm = mmap.mmap(f.fileno(), size) |
This file contains hidden or 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
provider "aws" {} | |
# Add a provider for the new member account | |
provider "aws" { | |
alias = "member_account" | |
assume_role { | |
role_arn = "arn:aws:iam::${aws_organizations_account.member_account.id}:role/${var.member_account_role_name}" | |
} | |
} |
This file contains hidden or 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 std::ops::Add; | |
struct CumSum<T, I> { | |
acc: Option<T>, | |
iter: I, | |
} | |
impl<T, I> Iterator for CumSum<T, I> | |
where | |
T: Add<Output = T> + Copy, |