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 std::{fmt::Write, process::Command}; | |
pub fn main() { | |
let root = std::env::var("CARGO_MANIFEST_DIR").expect("missing CARGO_MANIFEST_DIR env var"); | |
let out = std::env::var("OUT_DIR").expect("missing OUT_DIR env var"); | |
build_flatbufs(&root, &out); | |
} | |
fn build_flatbufs(root: &str, out: &str) { |
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 python3 | |
import sys | |
import glob | |
import json | |
import textwrap | |
from jnpr.junos import Device | |
from jnpr.junos.utils.config import Config | |
from xml.etree import ElementTree | |
from datetime import datetime |
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
{ config, pkgs, lib, ... }: | |
{ | |
containers.certbot = { | |
autoStart = true; | |
ephemeral = true; | |
bindMounts = { | |
"/var/lib/acme" = { hostPath = "/data/acme"; isReadOnly = false; }; | |
}; |
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
{ config, pkgs, ... }: | |
let | |
teleport = (import ./build.nix) { inherit pkgs; }; | |
in | |
{ | |
virtualisation.oci-containers.containers.teleport = { | |
image = "teleport:11.1.4"; | |
imageFile = teleport; | |
volumes = [ "${config.age.secrets.teleport-config.path}:/etc/teleport.d/teleport.yaml" "/data/teleport/data:/var/lib/teleport" ]; | |
ports = [ "443:443" "3025:3025" "3024:3024" "3023:3023" ]; |
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
{ pkgs ? import <nixpkgs> { } }: | |
pkgs.stdenv.mkDerivation rec { | |
name = "dnsconfig"; | |
version = "0.1.0"; | |
phases = [ "buildPhase" "testPhase" ]; | |
src = ./config; | |
buildPhase = '' |
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
ARG VERSION | |
FROM ubuntu AS download | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG VERSION | |
WORKDIR /tmp | |
RUN apt update && apt install -y curl | |
RUN curl -o teleport.tar.gz https://get.gravitational.com/teleport-v$VERSION-linux-arm64-bin.tar.gz \ | |
&& tar xvzf teleport.tar.gz |
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
{ config, pkgs, lib, ... }: | |
{ | |
containers.grafana = { | |
autoStart = true; | |
ephemeral = true; | |
bindMounts = { | |
"/data" = { | |
hostPath = "/data/random/grafana"; | |
isReadOnly = false; | |
}; |
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 requests | |
import json | |
import logging | |
import os | |
separator = '-------------------------------------------------------' | |
logging.basicConfig(format='%(levelname_brackets)s %(message)s', level=logging.INFO) | |
old_factory = logging.getLogRecordFactory() | |
def record_factory(*args, **kwargs): |
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] | |
name = "spotify-playlist-scraper" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
rspotify = { version = "0.11.3", features = ["cli"] } | |
futures = "0.3.19" |
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 a5f4c545e231d76226497b938baf0b9d7747584b Mon Sep 17 00:00:00 2001 | |
From: "jordan@doyle.la" <jordan@doyle.la> | |
Date: Fri, 7 Aug 2020 17:21:17 +0100 | |
Subject: [PATCH] Use CSS styles for syntax highlighting | |
--- | |
Cargo.lock | 6 +++--- | |
Cargo.toml | 2 +- | |
src/highlight.rs | 26 +++++++++++++------------- | |
src/main.rs | 9 ++++++++- |
NewerOlder