Skip to content

Instantly share code, notes, and snippets.

@ecumene
ecumene / output.txt
Created October 9, 2023 15:25
CUDA_ARCHITECTURE error
(base) mitch@Mitchells-MacBook-Pro gaussian-splatting-kit % docker build .
[+] Building 1331.2s (22/32)
[+] Building 4139.7s (23/32)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 4.46kB
@ecumene
ecumene / Dockerfile
Created January 31, 2023 18:19
Service Discovery for Dagster ECS
RUN apt-get install cron -y
COPY crontab /etc/cron.d/crontab
RUN crontab /etc/cron.d/crontab
COPY service_discovery.py $DAGSTER_HOME/service_discovery.py
@ecumene
ecumene / parser.rs
Last active June 5, 2022 20:43
A frontmatter parser
#[derive(Deserialize, Serialize)]
pub struct Markdown<T> {
pub meta: T,
pub content_markdown: String,
pub content_html: String,
}
const FRONTMATTER_DELIMITER: &str = "---";
pub fn parse_frontmatter<'de, T>(post: &'de str) -> Result<(T, &'de str), toml::de::Error>
@ecumene
ecumene / lib.rs
Created May 8, 2022 23:28
Spin File Server with MimeTypes + Index.html support
use anyhow::{anyhow, Context, Result};
use bytes::Bytes;
use spin_sdk::{
http::{Request, Response},
http_component,
};
use std::path::Path;
use std::{fs::File, io::Read};
/// A Spin HTTP component that reads and returns a static asset.
@ecumene
ecumene / parse_cookies.rs
Last active February 11, 2022 03:54
Parse cookies
#[derive(Debug, Clone)]
struct BadCookie;
type CookieResult<T> = std::result::Result<T, BadCookie>;
#[derive(Debug)]
struct Cookies<'a> {
cookies: HashMap<&'a str, &'a str>,
}
impl<'a> Cookies<'a> {
@ecumene
ecumene / keylog.py
Created July 23, 2017 16:48
Ecumene Sidebar
import urllib, pyxhook, threading, json
totalchars = 0
minuteChar = []
def fileArray():
urllib.urlretrieve("https://tmi.twitch.tv/group/user/ecumene/chatters", "data/chatters.json")
global totalchars
minuteChar.append(totalchars)
with open('data/minuteChars.txt', 'w') as outfile: