layout | title | published | tags | ||
---|---|---|---|---|---|
post |
clamav - install and configure on mac osx |
true |
|
Install clamav via homebrew
# 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 | |
} |
# 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() )) |
; 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 |
#!/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 |
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;
{{ $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}} |
<style> | |
img { | |
max-width: 100%; | |
} | |
</style> | |
<h1>Creating a srcset loop based on Resources</h1> | |
<!-- | |
NOTE: This requires Hugo 0.32 |