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
# /etc/nginx/conf.d/conda.conf | |
proxy_cache_path /var/cache/nginx/conda levels=2:2 keys_zone=conda:100m inactive=14d max_size=10g; | |
upstream conda.anaconda.org { | |
server 104.17.92.24:443; | |
server 104.17.93.24:443; | |
} | |
server { | |
listen 80; |
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
package main | |
import ( | |
"bytes" | |
"context" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"os" |
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 python | |
""" | |
This script is used to refresh the session token for the AWS CLI. | |
It maintains credentials in the AWS_SHARED_CREDENTIALS_FILE file, and | |
refreshes the session token when it is about to expire. | |
It relies on the following tools: | |
- pass: a password manager |
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 python | |
# | |
# Draw OSM geometries over each other projected to 1km units | |
# | |
# Install requirements: | |
# pip install osmnx matplotlib | |
# | |
# Usage: | |
# draw-projected "Cyprus island" "RU-MOW" | |
# |
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
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 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 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 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 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 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 |
NewerOlder