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
@tmanternach
tmanternach / nginx.conf
Created October 15, 2021 23:06
Old School blog served via https using nginx
# This server {} block is used to re-direct port 80/http traffic to port 443/https. Pretty common 301 re-direct.
server {
if ($host = static.trevormanternach.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name static.trevormanternach.com;
return 404; # managed by Certbot
}
@romkatv
romkatv / srand32.zsh
Last active May 4, 2024 05:04
srand32.zsh
# Returns a random 32-bit number.
# If /dev/urandom is cryptographically secure, so is srand32.
#
# If zsh is compiled with 64-bit number support, the result
# is non-negative. Otherwise it may be negative and the value
# is governed by the rules of unsigned-to-signed conversion in C.
#
# Examples:
#
# % print -r -- $(( srand32() ))
@DerFichtl
DerFichtl / clamav-macosx.md
Last active February 4, 2025 17:18
clamav on mac osx - install and configure the virus scanner on mac osx
layout title published tags
post
clamav - install and configure on mac osx
true
blog
clamav

Install Clamav

Install clamav via homebrew

@ForeSoftCorp
ForeSoftCorp / dbstrings.txt
Last active September 21, 2020 13:43
Sample TeamDesk Database translation file
; Common buttons
action.new = New
action.view = View
action.edit = Edit
action.del = Del
action.delete = Delete
action.restore = Restore
action.cancel = Cancel
action.back = Back
action.print = Print
@oseme-techguy
oseme-techguy / Correct_GnuPG_Permission.sh
Last active February 6, 2025 05:53
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
@prantlf
prantlf / japanese-font-family.md
Last active January 3, 2025 17:36 — forked from vanquang9387/japanese-font-family.md
Japanese default css font family

Most Japanese websites use default font sets provided on Windows, Mac or Ubuntu. The latest ones are Meiryo, Hiragino Kaku Gothic Pro and Noto. For older versions such like Windows XP, it is good to add former default fonts MS Gothic(or MS Mincho)/Osaka. Older Linux versions may include Takao fonts.

Some old browsers could not understand those font names in English, some others do not recognize the names in Japanese, so it is safe to write both in Japanese and English.

Meiryo and Hiragino's order is, because Mac users may have Meiryo from MS-Office, and Hiragino is more familiar and matching well on Mac, better by starting Hiragino series.

So the current recommended practice is like this:

font-family: "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", Osaka, メイリオ, Meiryo, "MS Pゴシック", "MS PGothic", "MS ゴシック" , "MS Gothic", "Noto Sans CJK JP", TakaoPGothic, sans-serif;
@eddiewebb
eddiewebb / readme.md
Last active April 9, 2025 04:31
Hugo JS Searching with Fuse.js
@randallmlough
randallmlough / hugo-img-partial.html
Last active June 21, 2021 01:36
Complete hugo img partial using page resources
{{ $image := .Params.image}}
{{ $media := (.Site.GetPage "page" "media").Resources }}
{{ $original := index ($media.Match (printf "%s" $image)) 0 }}
{{ $width := $original.Width}}
{{ $intWidth := int $width }}
{{ $sizes := .Params.sizes}}
{{ $options := .Params.options}}
{{ if le (len $sizes) 1 }}
{{ $oneSize := index $sizes 0}}
@randallmlough
randallmlough / hugo-img-srcset.html
Last active May 8, 2021 12:31
A hugo img srcset partial that auto resizes images
<style>
img {
max-width: 100%;
}
</style>
<h1>Creating a srcset loop based on Resources</h1>
<!--
NOTE: This requires Hugo 0.32
@seanh
seanh / user_stories.md
Last active February 20, 2025 15:51
My notes on user stories

User Stories

Reading list

  • [Mark Shead: Creating Good User Stories][Mark Shead]
  • [GOV.UK Service manual: Writing user stories][GOV.UK]
  • [Mike Cohn's blog posts about user stories][Mike Cohn]
  • [Mike Cohn: User Stories Applied (book)][User Stories Applied]