Skip to content

Instantly share code, notes, and snippets.

View zicklag's full-sized avatar
🛰️
Making awesome stuff!

Zicklag zicklag

🛰️
Making awesome stuff!
View GitHub Profile
@zicklag
zicklag / swarm-stack.yml
Last active May 25, 2021 00:31
SeaweedFS Swarm Stack
version: '3.5'
# WARNING: Haven't tested this version of this YAML exactly, but it *should* be correct.
services:
master-1:
image: chrislusf/seaweedfs:latest
networks:
- hostnet
command: "master -port=9333 -defaultReplication=001 -peers=localhost:9333,localhost:9334,localhost:9335"
@zicklag
zicklag / swarm-stack.yml
Created April 12, 2019 19:03
Testing LizardFS Swarm Stack
version: '3.5'
services:
mfsmaster-1:
image: lizardfs-test:latest
command: master ha master
networks:
- hostnet
environment:
DEBUG: "true"
MFSMASTER_PERSONALITY: ha-cluster-managed
@zicklag
zicklag / swarm.yml
Created August 17, 2019 19:15
Taiga Docker Swarm Stack
version: '3.5'
services:
taiga:
image: quay.io/riotkit/taiga:4.2.7
networks:
- default
- webgateway
volumes:
- media:/usr/src/taiga-back/media
@zicklag
zicklag / Creating a Proxy Proxy for Skipping Proxy Authentication Prompts.md
Last active January 13, 2021 08:12
How to setup a proxy for skipping proxy authentication prompts.

Creating a Proxy Proxy for Skipping Proxy Authentication Prompts

Update

I found an easier way to do this with a Go program that doesn't require writing a script and installing node. Check out this comment.

Original Solution

Some programs support a proxy, but they don't support authentication without prompting. This is the case with Chrome and VSCode. This caused me problems particularly when trying to automate Chrome with Selenium. The workaround is to run a local proxy, set your http_proxy environment variables to the local proxy, and tell the local proxy to, in turn, proxy requests to your real proxy and to include your username and password.

@zicklag
zicklag / cloudinit.yml
Last active April 22, 2022 13:50
Juju localhost bootstrap behind proxy with SSL Bump setup
cloudinit-userdata: |
ca-certs:
trusted:
- |
-----BEGIN CERTIFICATE-----
..........certcontents.....
-----END CERTIFICATE-----
cargo watch -s 'clear; cargo check --tests --color=always 2>&1 | head -40'
@zicklag
zicklag / docker.rs
Created December 19, 2019 21:49
Temp place for code I probably won't need
//! Docker related types
use anyhow::format_err;
use std::str::FromStr;
use std::fmt;
/// The definition of a Docker container run and all of its attributes such as image, volumes, etc.
#[derive(Default, Debug)]
pub(crate) struct ContainerSpec {
@zicklag
zicklag / scrollable.rs
Created December 20, 2019 22:27
Termimad example
//! run this example with
//! cargo run --example scrollable
//!
use crossterm::{
cursor::Hide,
cursor::Show,
event::{
self,
Event,
KeyEvent,
@zicklag
zicklag / log-cpu-mem-usage-better.sh
Last active January 13, 2020 01:19
Script for Printing Free Memory and CPU Usage on commandline every second
while sleep ${@:-1};
do vmstat --unit M | awk '/[0-9].*/ { printf "Free Memory: %sM CPU Usage: %s%s\n" , $4, $13, "%" }';
done
@zicklag
zicklag / macros.rs
Created January 16, 2020 16:43
Logging macro fakes
//
// Logging macros
//
// These act similar to the `log` crate's macro , but it uses our simpler and ( intentionally )
// synchronous logging implementation.
//
// Log a message with the given level
macro_rules! log {