Skip to content

Instantly share code, notes, and snippets.

View RickCogley's full-sized avatar
👻
Slowly but surely implementing ISO 27001 ISMS

Rick Cogley RickCogley

👻
Slowly but surely implementing ISO 27001 ISMS
View GitHub Profile
@RickCogley
RickCogley / 1. Readme.md
Created January 17, 2025 00:08
DMARC Default Digest Report

Below is a sample default DMARC digest report. This is why services such as DMARC Digests are so useful, because they translate the default XML into something more human-friendly.

@RickCogley
RickCogley / custom-footer.html
Last active January 4, 2025 01:36
Micro.blog design backup 202501
@RickCogley
RickCogley / 1. Problem.md
Last active December 9, 2024 02:51
Deno fetch gives error (TLS related, and origin is rust library)

Deno fetch gives error (TLS related, and origin is rust library)

Using fetch in Lume v2.4.2 (a Deno Typescript static site generator app) on Deno 2.1.2, I get this error when fetching to our ops db REST API:

fetch TypeError: "client error connection reset by peer"

I see a lot of people have had this same problem, in various GH issues, and it appears that it is because of the underlying Rust library being used. For example:

@RickCogley
RickCogley / box-decoration-break.markdown
Created December 1, 2024 01:02
Box decoration break
@RickCogley
RickCogley / standard-english-hyphenation.css
Last active November 14, 2024 04:02
English Hyphenation
/* Language supports hyphenation ハイフン対応可能な言語 */
html[lang="en"] {
text-align: left;
-webkit-hyphens: auto;
-webkit-hyphenate-limit-before: 3;
-webkit-hyphenate-limit-after: 3;
-webkit-hyphenate-limit-chars: 6 3 3;
-webkit-hyphenate-limit-lines: 2;
-webkit-hyphenate-limit-last: always;
-webkit-hyphenate-limit-zone: 8%;
@RickCogley
RickCogley / Correct_GnuPG_Permission.sh
Created November 4, 2024 08:39 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@RickCogley
RickCogley / 1 CMS git.md
Last active November 3, 2024 23:14
Tips for git with cms

I have a situation where I have scripts pushing changes to a github repository on feature branches. What settings should I use to make the process as smooth as possible?

To ensure a smooth process for scripts pushing changes to a GitHub repository on feature branches, consider the following settings and best practices:

  1. Branch Protection Rules:

    • Enable branch protection rules to prevent direct pushes to the main branch. This ensures that all changes go through a pull request (PR) process.
    • Require status checks to pass before merging. This can include automated tests or other CI/CD checks.
  2. Commit Messages:

@RickCogley
RickCogley / readme.md
Last active January 6, 2024 00:36
Markdown 基礎の基礎

Markdown とは、元々John Gruber氏のこちらのブログで仕様説明が発表されてから色んなシステムが使っています。

検索すれば様々な情報が出ますが、基礎の基礎として:

テキストにボルド体にするには:

**ボルド体**

日本語では珍しいかもしれないけど イタリック体 もあり:

@RickCogley
RickCogley / 1. Readme.md
Last active May 14, 2023 01:17
Append to Dictionary File in nushell

Appending Words to a Dictionary File in Nushell

I call a dictionary file from my nupass.nu password generator command, which is simply a file with one Japanese word or phrase per line. I wanted to be able to easily add words to the dictionary file, followed by a quick git commit, hence this nushell script.

In this case, it's easy to just add those commands to nushell's env.nu instead of having them as a separate script file. Once added, I just reloaded nushell, and then it was just a matter of doing the following to add the words to the file:

> dict add onepiece golgo13 dragonball naruto doraemon 

See the screenshot below for what the output looks like.

@RickCogley
RickCogley / 1. Readme.md
Last active May 3, 2023 00:05
Nushell password generator

Nushell Password Generator "nupass"

This nushell command randomly retrieves a specified number of words from a dictionary file (English with Japanese words added by @rickcogley) less than or equal to a given parameter's length, formats the words randomly with capitalization, then separates the words with some random symbols and numbers to return a password.

To use:

  1. Get the dictionary file to your system using nushell's http:
http get https://raw.githubusercontent.com/RickCogley/jpassgen/master/genpass-dict-jp.txt | save genpass-dict-jp