Skip to content

Instantly share code, notes, and snippets.

View mysteriouspants's full-sized avatar
:shipit:
Help! I'm trapped in a fixed-width str

Christopher R. Miller mysteriouspants

:shipit:
Help! I'm trapped in a fixed-width str
View GitHub Profile
@mysteriouspants
mysteriouspants / podman_system_service.rs
Last active April 23, 2023 19:52
start a podman system service and tie that child process to your podtender api layer
//! Start a Podman service socket.
use podtender::podman_service::PodmanService;
use std::{
env::{var, VarError},
io::Error as IOError,
ops::Deref,
sync::Arc,
time::{SystemTime, UNIX_EPOCH},
};
@mysteriouspants
mysteriouspants / command_map_example.rs
Created January 11, 2023 05:07
Example use of a subcommand dispatcher for the Clap argument parser
use std::error::Error;
use clap::{Arg, ArgMatches, builder::NonEmptyStringValueParser, Command};
use mysteriouspants_clap_action_command::{
ActionCommand, CommandMap, get_one, vec1::{Vec1, vec1}
};
static NAME_ARG: &str = "name";
struct HelloWorldCommand {}

uDevGames 2020Q4 Hobbyist Game Jam

Runs from 1 October 2020 00:00:00 UTC+14 to 1 January 2021 00:00:00 UTC-12. lol that didn't happen, probably safer to not do anything in 2020, anyway

This is a hobbyist game jam. You have a full quarter of a year to complete your project. You can take a week off of work and do it in a week of concentrated effort, or you can spread it out over nights and weekends. Or a combo of both.

As a hobbyist game jam, you get to define what success means for you! The jam is a vehicle to encourage positivity and productivity. Pick something that interests you, but we suggest you keep the scope of your game quite small.

Some ideas are,

xpm@VEGAS:~$ ./rustup-init
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
It will add the cargo, rustc, rustup and other commands to
Cargo's bin directory, located at:
struct NoMemEntryStore<TSource: Read + Seek> {
/// information about the archive as a whole
archive: Archive,
/// the input source of the archive
source: TSource,
}
impl<TSource: Read + Seek> IndexStrategy for NoMemEntryStore<TSource> {
pub trait Source : Read + Seek + Send { }
impl<TSource: Source> NoMemEntryStore<TSource> {
/// Reads an archive from an input source. Optionally scans each entry
/// header, which would detect errors in the archive earlier.
pub fn from_source(
source: &mut TSource, verify: bool
) -> Result<NoMemEntryStore<TSource>, ArchiveParseError> {
let archive = Archive::load_from(source)?;
xpm@VEGAS:/mnt/c/Code/zola$ cargo install --path .
Installing zola v0.9.0 (/mnt/c/Code/zola)
Updating crates.io index
Compiling html5ever v0.24.1
Compiling utils v0.1.0 (/mnt/c/Code/zola/components/utils)
Compiling config v0.1.0 (/mnt/c/Code/zola/components/config)
Compiling front_matter v0.1.0 (/mnt/c/Code/zola/components/front_matter)
Compiling imageproc v0.1.0 (/mnt/c/Code/zola/components/imageproc)
Compiling rendering v0.1.0 (/mnt/c/Code/zola/components/rendering)
Compiling ammonia v3.0.0
xpm@VEGAS:/mnt/c/Code/zola$ cargo install --path .
Installing zola v0.9.0 (/mnt/c/Code/zola)
Updating crates.io index
Downloaded itoa v0.4.5
Compiling libc v0.2.66
Compiling cfg-if v0.1.10
Compiling lazy_static v1.4.0
Compiling autocfg v0.1.7
Compiling proc-macro2 v1.0.8
Compiling unicode-xid v0.2.0
extern crate clap;
extern crate reqwest;
use std::thread;
use clap::{Arg, App};
fn main() {
let args = App::new("webget")
.version("1.0")
.author("Desert Code Camp 2018")
SWAGGER_CODEGEN_JAR_NAME="swagger-codegen-cli-2.4.0-20180804.163312-304.jar"
SWAGGER_CODEGEN_JAR_URL="https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.0-SNAPSHOT/$SWAGGER_CODEGEN_JAR_NAME"
ESI_SWAGGER_DEFINITION_URL="https://esi.evetech.net/latest/swagger.json?datasource=tranquility"
if [ ! -f "$SWAGGER_CODEGEN_JAR_NAME" ]; then
wget $SWAGGER_CODEGEN_JAR_URL
fi
java -jar $SWAGGER_CODEGEN_JAR_NAME generate \
-l rust \