Skip to content

Instantly share code, notes, and snippets.

View josephbolus's full-sized avatar

Joseph Bolus josephbolus

View GitHub Profile
@josephbolus
josephbolus / redis.conf
Created April 24, 2024 19:26
default Redis config
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
@josephbolus
josephbolus / README.md
Last active April 22, 2024 23:04
SeaweedFS Cluster Setup Guide

Configuring Replication at Startup

When you start the master server, you can specify the replication strategy using the -defaultReplication flag. This flag defines how data is replicated across the cluster. Here's how you can set it:

  • 000: no replication
  • 001: replicate once on the same rack
  • 010: replicate once on a different rack, but same data center
  • 100: replicate once on a different data center
  • 200: replicate twice on two different data center
  • 110: replicate once on a different rack, and once on a different data center
[
{
"key": "ctrl+e",
"command": "-workbench.action.quickOpen",
},
{
"key": "ctrl+e",
"command": "workbench.action.quickOpen",
"when": "!terminalFocus"
}

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@josephbolus
josephbolus / npm-template.md
Created October 11, 2023 20:24 — forked from scyto/npm-template.md
Nginx Proxy Manager swarm template

Description

This template runs my experimental NPM service as part of evaluating if i should stop using my hand crafted nginx reverse proxy. Note change your passwords and don't use the examples bellow :-) )

State Considerations for SWARM

This container has a database, as such I store the data on the gluster volume. I am currenlty using a mount point to store the voume data on glusterfs. I restrict to 1 instance of each container to avoid database corruption from having two instances. Change example usernames and passwords as needed. leave hostname as db (name resolution works fine using the method)

@josephbolus
josephbolus / Makefile
Last active September 11, 2023 19:04
Self-Documented Makefile
.PHONY: help
help: ## ## Display this help
@printf "\nusage : make <commands> \n\nthe following commands are available : \n\n"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
install: ## Install npm dependencies for the api, admin, and frontend apps
@echo "Installing Node dependencies"
@npm install
@josephbolus
josephbolus / ssh-key-for-ansible-playbook.md
Created May 2, 2023 19:16 — forked from OlegGorj/ssh-key-for-ansible-playbook.md
Specifying ssh key in ansible playbook file

The variable name is ansible_ssh_private_key_file .

One should set it at 'vars' level:

  • in the inventory file:
myHost ansible_ssh_private_key_file=~/.ssh/mykey1.pem
myOtherHost ansible_ssh_private_key_file=~/.ssh/mykey2.pem
@josephbolus
josephbolus / WIP_install_docker_on_wsl2.sh
Last active April 21, 2023 22:17
WSL2 Rocky Linux and Windows Terminal Install
#!/bin/bash
# Set Docker Package Source
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
# Run system update to rebuild DNF cache:
sudo dnf update
# Use misc tools and dependencies
sudo dnf install -y nano mc sudo dnf-plugin-config-manager wget dnf-plugins-core tree dos2unix iptables-legacy
@josephbolus
josephbolus / chrome-socks5.cmd
Created March 9, 2023 22:37
Start Chrome With SOCK5 Tunnel
"C:\Program Files\Google\Chrome\Application\chrome.exe" --user-data-dir="%USERPROFILE%\socks5-proxy-profile" --proxy-server="socks5://localhost:9000" --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost" & timeout 2 & rmdir /S /Q "%USERPROFILE%\socks5-proxy-profile"
@josephbolus
josephbolus / psoft-debug-sso
Last active March 6, 2023 23:43
Write SSO Header to APPSRV log
Local string &ssoHeader = "X_AUTH_REQUEST_EMAIL";
Local string &emailHeader = %Request.GetHeader(&ssoHeader);
/* APPSRV log for debugging */
If None(&emailHeader) Then
WriteToLog(%ApplicationLogFence_Error, "----------------------------------------------------------------------");
WriteToLog(%ApplicationLogFence_Error, " ERROR: (" | &ssoHeader | ") SSO HEADER MISSING");
WriteToLog(%ApplicationLogFence_Error, "----------------------------------------------------------------------");
Else
/* ↓↓↓↓ Grab oprid/username from DB ↓↓↓↓ */
/* SQLExec("SELECT A.OPRID FROM PSOPRDEFN A WHERE ( A.EMAILID = :1)", &emailHeader, &userID); */