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 = "tmp" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
anyhow = "1.0.86" | |
clap = { version = "4.5.4", features = ["derive"] } |
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 debian:trixie-20230904-slim | |
ENV DEBIAN_FRONTEND=noninteractive | |
# https://snapshot.debian.org/archive/debian/20240515T144351Z/ | |
ARG SNAPSHOT=20240515T144351Z | |
RUN \ | |
--mount=type=cache,target=/var/cache/apt,sharing=locked \ | |
--mount=type=cache,target=/var/lib/apt,sharing=locked \ |
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 dataclasses import dataclass, field, fields | |
from http.server import BaseHTTPRequestHandler as BaseHandler | |
from http.server import HTTPServer | |
from typing import IO | |
from uuid import uuid4 | |
import json | |
import os | |
import re | |
import socket |
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
# run 'mcpan MaxMind::DB::Writer::Tree' beforehand | |
use MaxMind::DB::Writer::Tree; | |
use Net::Works::Network; | |
my %types = (); | |
my $tree = MaxMind::DB::Writer::Tree->new( | |
ip_version => 4, | |
record_size => 24, |
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"; | |
const isFirstRun = async () => { | |
const pluginStore = strapi.store({ | |
environment: "", | |
type: "type", | |
name: "setup", | |
}); | |
const initHasRun = await pluginStore.get({ key: "initHasRun" }); |
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 { createContext, useContext, useReducer } from "react"; | |
const initialState = { | |
isSigningIn: false, | |
isSignedIn: false, | |
}; | |
const AuthContext = createContext(initialState); | |
const reducer = (state, action) => { |
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
variable "iso_url" { | |
type = string | |
default = "https://cdimage.debian.org/cdimage/release/10.8.0/amd64/iso-cd/debian-10.8.0-amd64-netinst.iso" | |
} | |
variable "iso_checksum" { | |
type = string | |
default = "file:https://cdimage.debian.org/cdimage/release/10.8.0/amd64/iso-cd/MD5SUMS" | |
} |
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" | |
"crypto/aes" | |
"crypto/cipher" | |
"encoding/hex" | |
"encoding/json" | |
"flag" | |
"fmt" |
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
void main() { | |
var d = StubDoer(() { | |
print("Also doing..."); | |
}); | |
d = wrapWithTimes(100)(d); | |
d = wrapWithMetrics()(d); | |
d = wrapWithTracing()(d); | |
doStuff(d); |
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
export MUSIC_PATH=/media/pi/CC72-D726 | |
docker network create koel | |
docker run \ | |
-d \ | |
--name mysql \ | |
--network koel \ | |
-e MYSQL_ROOT_PASSWORD=123456 \ | |
-e MYSQL_USER=koel \ |