diff --git a/.direnv/flake-inputs/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source b/.direnv/flake-inputs/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source new file mode 120000 index 0000000..15c7720 --- /dev/null +++ b/.direnv/flake-inputs/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source @@ -0,0 +1 @@ +/nix/store/2kk6k544kgd4qig5rx812qn2qcwjx5qh-source \ No newline at end of file diff --git a/.direnv/flake-inputs/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source b/.direnv/flake-inputs/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source new file mode 120000 index 0000000..e09c353 --- /dev/null +++ b/.direnv/flake-inputs/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source @@ -0,0 +1 @@ +/nix/store/p1ranb8qkpgcwh3lag39jjmcajk7rsjx-source \ No newline at end of file diff --git a/.direnv/flake-inputs/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source b/.direnv/flake-inputs/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source new file mode 120000 index 0000000..a4d1d6a --- /dev/null +++ b/.direnv/flake-inputs/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source @@ -0,0 +1 @@ +/nix/store/pnwyi8fcq1v0b9i4905b3yxkaw29dmly-source \ No newline at end of file diff --git a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa new file mode 120000 index 0000000..8956b22 --- /dev/null +++ b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa @@ -0,0 +1 @@ +/nix/store/h22lwjkqqckazfmbpj95i36zzwwkvq1z-nix-shell-env \ No newline at end of file diff --git a/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc new file mode 100644 index 0000000..c99838c --- /dev/null +++ b/.direnv/flake-profile-a5d5b61aa8a61b7d9d765e1daf971a9a578f1cfa.rc @@ -0,0 +1,1630 @@ +unset shellHook +nix_saved_PATH="$PATH" +AR='ar' +export AR +AS='as' +export AS +BASH='/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin/bash' +CC='gcc' +export CC +CONFIG_SHELL='/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin/bash' +export CONFIG_SHELL +CXX='g++' +export CXX +EPOCHREALTIME='1643054257.339516' +EPOCHSECONDS='1643054257' +HOSTTYPE='x86_64' +HOST_PATH='/nix/store/176gh50y24c0lx2bnnmsvf9wazb73php-coreutils-9.0/bin:/nix/store/g0hhds9sdiqds0xxgpn7v4pwcv89varr-findutils-4.8.0/bin:/nix/store/ywy7hggaj6vvgw86vbnyirll697ic5jx-diffutils-3.8/bin:/nix/store/4na05j9gmpp3dwhmnc1q0a108ymf2qjy-gnused-4.8/bin:/nix/store/pkj79ap8x2dalzl63ndpdmxg2crxpjl8-gnugrep-3.7/bin:/nix/store/yabl1gmn7balb15hbcj613jcz0cxny42-gawk-5.1.1/bin:/nix/store/sdpqvnmahizaxbs3nnzmgfgyqsdxb1bw-gnutar-1.34/bin:/nix/store/7f3bipp5x4yiqghnkkv88rfsqzs6fl9z-gzip-1.11/bin:/nix/store/2ccy5zc89zpc2aznqxgvzp4wm1bwj05n-bzip2-1.0.6.0.2-bin/bin:/nix/store/vhsx8rivchbvc6xnymyc45vvk7c7dz25-gnumake-4.3/bin:/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin:/nix/store/hjg2fnn41awrq6xzaq3cjfar6jwfcbw6-patch-2.7.6/bin:/nix/store/cxd7laqdidlqvqrlzsd4cls8470h6rwb-xz-5.2.5-bin/bin' +export HOST_PATH +IFS=' +' +IN_NIX_SHELL='impure' +export IN_NIX_SHELL +LD='ld' +export LD +LINENO='73' +MACHTYPE='x86_64-pc-linux-gnu' +NIX_BINTOOLS='/nix/store/w327j7z9wlv7hym4spjzagax7c5hqvrf-binutils-wrapper-2.35.2' +export NIX_BINTOOLS +NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' +export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_BUILD_CORES='12' +export NIX_BUILD_CORES +NIX_CC='/nix/store/npm4g1zsj5yzygf6bq46pbi9fqhxisha-gcc-wrapper-10.3.0' +export NIX_CC +NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1' +export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu +NIX_CFLAGS_COMPILE=' -frandom-seed=h22lwjkqqc' +export NIX_CFLAGS_COMPILE +NIX_ENFORCE_NO_NATIVE='1' +export NIX_ENFORCE_NO_NATIVE +NIX_HARDENING_ENABLE='fortify stackprotector pic strictoverflow format relro bindnow' +export NIX_HARDENING_ENABLE +NIX_INDENT_MAKE='1' +export NIX_INDENT_MAKE +NIX_LDFLAGS='-rpath /home/kristof/prv/git/blog/outputs/out/lib64 -rpath /home/kristof/prv/git/blog/outputs/out/lib ' +export NIX_LDFLAGS +NIX_LIB64_IN_SELF_RPATH='1' +NIX_NO_SELF_RPATH='1' +NIX_STORE='/nix/store' +export NIX_STORE +NM='nm' +export NM +OBJCOPY='objcopy' +export OBJCOPY +OBJDUMP='objdump' +export OBJDUMP +OLDPWD='' +export OLDPWD +OPTERR='1' +OSTYPE='linux-gnu' +PATH='/nix/store/bhk8r97h4n6ag1qrplb9q8vjnkfqnq91-hugo-0.92.0/bin:/nix/store/9wjacdm5cy68ixhj6fd567hk5lldca30-patchelf-0.14.3/bin:/nix/store/npm4g1zsj5yzygf6bq46pbi9fqhxisha-gcc-wrapper-10.3.0/bin:/nix/store/mlfy9ifzszg7z2q6aiblvm5qkfn3bmwb-gcc-10.3.0/bin:/nix/store/4687f3vcym7a3ipjh0lfm5qlr12m76nr-glibc-2.33-59-bin/bin:/nix/store/176gh50y24c0lx2bnnmsvf9wazb73php-coreutils-9.0/bin:/nix/store/w327j7z9wlv7hym4spjzagax7c5hqvrf-binutils-wrapper-2.35.2/bin:/nix/store/cdm6zywd51mbabxhklsixwcskv4n70s3-binutils-2.35.2/bin:/nix/store/176gh50y24c0lx2bnnmsvf9wazb73php-coreutils-9.0/bin:/nix/store/g0hhds9sdiqds0xxgpn7v4pwcv89varr-findutils-4.8.0/bin:/nix/store/ywy7hggaj6vvgw86vbnyirll697ic5jx-diffutils-3.8/bin:/nix/store/4na05j9gmpp3dwhmnc1q0a108ymf2qjy-gnused-4.8/bin:/nix/store/pkj79ap8x2dalzl63ndpdmxg2crxpjl8-gnugrep-3.7/bin:/nix/store/yabl1gmn7balb15hbcj613jcz0cxny42-gawk-5.1.1/bin:/nix/store/sdpqvnmahizaxbs3nnzmgfgyqsdxb1bw-gnutar-1.34/bin:/nix/store/7f3bipp5x4yiqghnkkv88rfsqzs6fl9z-gzip-1.11/bin:/nix/store/2ccy5zc89zpc2aznqxgvzp4wm1bwj05n-bzip2-1.0.6.0.2-bin/bin:/nix/store/vhsx8rivchbvc6xnymyc45vvk7c7dz25-gnumake-4.3/bin:/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin:/nix/store/hjg2fnn41awrq6xzaq3cjfar6jwfcbw6-patch-2.7.6/bin:/nix/store/cxd7laqdidlqvqrlzsd4cls8470h6rwb-xz-5.2.5-bin/bin' +export PATH +PS4='+ ' +RANLIB='ranlib' +export RANLIB +READELF='readelf' +export READELF +SHELL='/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin/bash' +export SHELL +SIZE='size' +export SIZE +SOURCE_DATE_EPOCH='315532800' +export SOURCE_DATE_EPOCH +STRINGS='strings' +export STRINGS +STRIP='strip' +export STRIP +XDG_DATA_DIRS='/nix/store/bhk8r97h4n6ag1qrplb9q8vjnkfqnq91-hugo-0.92.0/share:/nix/store/9wjacdm5cy68ixhj6fd567hk5lldca30-patchelf-0.14.3/share' +export XDG_DATA_DIRS +buildInputs='' +export buildInputs +buildPhase='echo "------------------------------------------------------------" >>$out +echo " WARNING: the existence of this path is not guaranteed." >>$out +echo " It is an internal implementation detail for pkgs.mkShell." >>$out +echo "------------------------------------------------------------" >>$out +echo >> $out +# Record all build inputs as runtime dependencies +export >> $out +' +export buildPhase +builder='/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin/bash' +export builder +configureFlags='' +export configureFlags +defaultBuildInputs='' +defaultNativeBuildInputs='/nix/store/9wjacdm5cy68ixhj6fd567hk5lldca30-patchelf-0.14.3 /nix/store/59jmzisg8fkm9c125fw384dqq1np602l-move-docs.sh /nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh /nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh /nix/store/bkxq1nfi6grmww5756ynr1aph7w04lkk-strip.sh /nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh /nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh /nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh /nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh /nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh /nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh /nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh /nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh /nix/store/wlwcf1nw2b21m4gghj70hbg1v7x53ld8-reproducible-builds.sh /nix/store/npm4g1zsj5yzygf6bq46pbi9fqhxisha-gcc-wrapper-10.3.0' +depsBuildBuild='' +export depsBuildBuild +depsBuildBuildPropagated='' +export depsBuildBuildPropagated +depsBuildTarget='' +export depsBuildTarget +depsBuildTargetPropagated='' +export depsBuildTargetPropagated +depsHostHost='' +export depsHostHost +depsHostHostPropagated='' +export depsHostHostPropagated +depsTargetTarget='' +export depsTargetTarget +depsTargetTargetPropagated='' +export depsTargetTargetPropagated +doCheck='' +export doCheck +doInstallCheck='' +export doInstallCheck +dontAddDisableDepTrack='1' +export dontAddDisableDepTrack +declare -a envBuildBuildHooks=() +declare -a envBuildHostHooks=() +declare -a envBuildTargetHooks=() +declare -a envHostHostHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) +declare -a envHostTargetHooks=('ccWrapper_addCVars' 'bintoolsWrapper_addLDVars' ) +declare -a envTargetTargetHooks=() +declare -a fixupOutputHooks=('if [ -z "${dontPatchELF-}" ]; then patchELF "$prefix"; fi' '_makeSymlinksRelative' 'if [ -z "${dontGzipMan-}" ]; then compressManPages "$prefix"; fi' '_doStrip' 'patchShebangsAuto' '_pruneLibtoolFiles' 'if [[ -z "${noAuditTmpdir-}" && -e "$prefix" ]]; then auditTmpdir "$prefix"; fi' '_moveSystemdUserUnits' '_moveSbin' '_moveLib64' ) +guess='12' +initialPath='/nix/store/176gh50y24c0lx2bnnmsvf9wazb73php-coreutils-9.0 /nix/store/g0hhds9sdiqds0xxgpn7v4pwcv89varr-findutils-4.8.0 /nix/store/ywy7hggaj6vvgw86vbnyirll697ic5jx-diffutils-3.8 /nix/store/4na05j9gmpp3dwhmnc1q0a108ymf2qjy-gnused-4.8 /nix/store/pkj79ap8x2dalzl63ndpdmxg2crxpjl8-gnugrep-3.7 /nix/store/yabl1gmn7balb15hbcj613jcz0cxny42-gawk-5.1.1 /nix/store/sdpqvnmahizaxbs3nnzmgfgyqsdxb1bw-gnutar-1.34 /nix/store/7f3bipp5x4yiqghnkkv88rfsqzs6fl9z-gzip-1.11 /nix/store/2ccy5zc89zpc2aznqxgvzp4wm1bwj05n-bzip2-1.0.6.0.2-bin /nix/store/vhsx8rivchbvc6xnymyc45vvk7c7dz25-gnumake-4.3 /nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12 /nix/store/hjg2fnn41awrq6xzaq3cjfar6jwfcbw6-patch-2.7.6 /nix/store/cxd7laqdidlqvqrlzsd4cls8470h6rwb-xz-5.2.5-bin' +name='nix-shell' +export name +nativeBuildInputs='/nix/store/bhk8r97h4n6ag1qrplb9q8vjnkfqnq91-hugo-0.92.0' +export nativeBuildInputs +out='/home/kristof/prv/git/blog/outputs/out' +export out +outputBin='out' +outputDev='out' +outputDevdoc='REMOVE' +outputDevman='out' +outputDoc='out' +outputInclude='out' +outputInfo='out' +outputLib='out' +outputMan='out' +outputs='out' +export outputs +patches='' +export patches +phases='buildPhase' +export phases +pkg='/nix/store/npm4g1zsj5yzygf6bq46pbi9fqhxisha-gcc-wrapper-10.3.0' +declare -a pkgsBuildBuild=() +declare -a pkgsBuildHost=('/nix/store/bhk8r97h4n6ag1qrplb9q8vjnkfqnq91-hugo-0.92.0' '/nix/store/9wjacdm5cy68ixhj6fd567hk5lldca30-patchelf-0.14.3' '/nix/store/59jmzisg8fkm9c125fw384dqq1np602l-move-docs.sh' '/nix/store/kxw6q8v6isaqjm702d71n2421cxamq68-make-symlinks-relative.sh' '/nix/store/m54bmrhj6fqz8nds5zcj97w9s9bckc9v-compress-man-pages.sh' '/nix/store/bkxq1nfi6grmww5756ynr1aph7w04lkk-strip.sh' '/nix/store/bnj8d7mvbkg3vdb07yz74yhl3g107qq5-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/8zxndz5ag0p6s526c2xyllhk1nrn4c3i-audit-tmpdir.sh' '/nix/store/c8n9kcdddp9np665xz6ri61b383nxvz8-move-systemd-user-units.sh' '/nix/store/1i5y55x4b4m9qkx5dqbmr1r6bvrqbanw-multiple-outputs.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/ngg1cv31c8c7bcm2n8ww4g06nq7s4zhm-set-source-date-epoch-to-latest.sh' '/nix/store/wlwcf1nw2b21m4gghj70hbg1v7x53ld8-reproducible-builds.sh' '/nix/store/npm4g1zsj5yzygf6bq46pbi9fqhxisha-gcc-wrapper-10.3.0' '/nix/store/w327j7z9wlv7hym4spjzagax7c5hqvrf-binutils-wrapper-2.35.2' ) +declare -a pkgsBuildTarget=() +declare -a pkgsHostHost=() +declare -a pkgsHostTarget=() +declare -a pkgsTargetTarget=() +declare -a postFixupHooks=('_multioutPropagateDev' ) +declare -a postUnpackHooks=('_updateSourceDateEpochFromSourceRoot' ) +declare -a preConfigureHooks=('_multioutConfig' ) +declare -a preFixupHooks=('_moveToShare' '_multioutDocs' '_multioutDevs' ) +prefix='/home/kristof/prv/git/blog/outputs/out' +declare -a propagatedBuildDepFiles=('propagated-build-build-deps' 'propagated-native-build-inputs' 'propagated-build-target-deps' ) +propagatedBuildInputs='' +export propagatedBuildInputs +declare -a propagatedHostDepFiles=('propagated-host-host-deps' 'propagated-build-inputs' ) +propagatedNativeBuildInputs='' +export propagatedNativeBuildInputs +declare -a propagatedTargetDepFiles=('propagated-target-target-deps' ) +shell='/nix/store/pbfraw351mksnkp2ni9c4rkc9cpp89iv-bash-5.1-p12/bin/bash' +export shell +shellHook='' +export shellHook +stdenv='/nix/store/1sa0afk52ww5by5ibrv3v54l90wzk480-stdenv-linux' +export stdenv +strictDeps='' +export strictDeps +system='x86_64-linux' +export system +declare -a unpackCmdHooks=('_defaultUnpack' ) +_activatePkgs () +{ + + local hostOffset targetOffset; + local pkg; + for hostOffset in "${allPlatOffsets[@]}"; + do + local pkgsVar="${pkgAccumVarVars[hostOffset + 1]}"; + for targetOffset in "${allPlatOffsets[@]}"; + do + (( hostOffset <= targetOffset )) || continue; + local pkgsRef="${pkgsVar}[$targetOffset - $hostOffset]"; + local pkgsSlice="${!pkgsRef}[@]"; + for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; + do + activatePackage "$pkg" "$hostOffset" "$targetOffset"; + done; + done; + done +} +_addRpathPrefix () +{ + + if [ "${NIX_NO_SELF_RPATH:-0}" != 1 ]; then + export NIX_LDFLAGS="-rpath $1/lib ${NIX_LDFLAGS-}"; + if [ -n "${NIX_LIB64_IN_SELF_RPATH:-}" ]; then + export NIX_LDFLAGS="-rpath $1/lib64 ${NIX_LDFLAGS-}"; + fi; + if [ -n "${NIX_LIB32_IN_SELF_RPATH:-}" ]; then + export NIX_LDFLAGS="-rpath $1/lib32 ${NIX_LDFLAGS-}"; + fi; + fi +} +_addToEnv () +{ + + local depHostOffset depTargetOffset; + local pkg; + for depHostOffset in "${allPlatOffsets[@]}"; + do + local hookVar="${pkgHookVarVars[depHostOffset + 1]}"; + local pkgsVar="${pkgAccumVarVars[depHostOffset + 1]}"; + for depTargetOffset in "${allPlatOffsets[@]}"; + do + (( depHostOffset <= depTargetOffset )) || continue; + local hookRef="${hookVar}[$depTargetOffset - $depHostOffset]"; + if [[ -z "${strictDeps-}" ]]; then + local visitedPkgs=""; + for pkg in "${pkgsBuildBuild[@]}" "${pkgsBuildHost[@]}" "${pkgsBuildTarget[@]}" "${pkgsHostHost[@]}" "${pkgsHostTarget[@]}" "${pkgsTargetTarget[@]}"; + do + if [[ "$visitedPkgs" = *"$pkg"* ]]; then + continue; + fi; + runHook "${!hookRef}" "$pkg"; + visitedPkgs+=" $pkg"; + done; + else + local pkgsRef="${pkgsVar}[$depTargetOffset - $depHostOffset]"; + local pkgsSlice="${!pkgsRef}[@]"; + for pkg in ${!pkgsSlice+"${!pkgsSlice}"}; + do + runHook "${!hookRef}" "$pkg"; + done; + fi; + done; + done +} +_allFlags () +{ + + for varName in $(awk 'BEGIN { for (v in ENVIRON) if (v ~ /^[a-z][a-zA-Z0-9_]*$/) print v }'); + do + if (( "${NIX_DEBUG:-0}" >= 1 )); then + printf "@%s@ -> %q\n" "${varName}" "${!varName}"; + fi; + args+=("--subst-var" "$varName"); + done +} +_assignFirst () +{ + + local varName="$1"; + local REMOVE=REMOVE; + shift; + while (( $# )); do + if [ -n "${!1-}" ]; then + eval "${varName}"="$1"; + return; + fi; + shift; + done; + echo "Error: _assignFirst found no valid variant!"; + return 1 +} +_callImplicitHook () +{ + + local def="$1"; + local hookName="$2"; + if declare -F "$hookName" > /dev/null; then + "$hookName"; + else + if type -p "$hookName" > /dev/null; then + source "$hookName"; + else + if [ -n "${!hookName:-}" ]; then + eval "${!hookName}"; + else + return "$def"; + fi; + fi; + fi +} +_defaultUnpack () +{ + + local fn="$1"; + if [ -d "$fn" ]; then + cp -pr --reflink=auto -- "$fn" "$(stripHash "$fn")"; + else + case "$fn" in + *.tar.xz | *.tar.lzma | *.txz) + xz -d < "$fn" | tar xf - --warning=no-timestamp + ;; + *.tar | *.tar.* | *.tgz | *.tbz2 | *.tbz) + tar xf "$fn" --warning=no-timestamp + ;; + *) + return 1 + ;; + esac; + fi +} +_doStrip () +{ + + local -ra flags=(dontStripHost dontStripTarget); + local -ra stripCmds=(STRIP TARGET_STRIP); + if [[ "${STRIP-}" == "${TARGET_STRIP-}" ]]; then + dontStripTarget+=1; + fi; + local i; + for i in ${!stripCmds[@]}; + do + local -n flag="${flags[$i]}"; + local -n stripCmd="${stripCmds[$i]}"; + if [[ -n "${dontStrip-}" || -n "${flag-}" ]] || ! type -f "${stripCmd-}" 2> /dev/null; then + continue; + fi; + stripDebugList=${stripDebugList:-lib lib32 lib64 libexec bin sbin}; + if [ -n "$stripDebugList" ]; then + stripDirs "$stripCmd" "$stripDebugList" "${stripDebugFlags:--S}"; + fi; + stripAllList=${stripAllList:-}; + if [ -n "$stripAllList" ]; then + stripDirs "$stripCmd" "$stripAllList" "${stripAllFlags:--s}"; + fi; + done +} +_eval () +{ + + if declare -F "$1" > /dev/null 2>&1; then + "$@"; + else + eval "$1"; + fi +} +_makeSymlinksRelative () +{ + + local symlinkTarget; + if [ -n "${dontRewriteSymlinks-}" ]; then + return 0; + fi; + while IFS= read -r -d '' f; do + symlinkTarget=$(readlink "$f"); + if [[ "$symlinkTarget"/ != "$prefix"/* ]]; then + continue; + fi; + if [ ! -e "$symlinkTarget" ]; then + echo "the symlink $f is broken, it points to $symlinkTarget (which is missing)"; + fi; + echo "rewriting symlink $f to be relative to $prefix"; + ln -snrf "$symlinkTarget" "$f"; + done < <(find $prefix -type l -print0) +} +_moveLib64 () +{ + + if [ "${dontMoveLib64-}" = 1 ]; then + return; + fi; + if [ ! -e "$prefix/lib64" -o -L "$prefix/lib64" ]; then + return; + fi; + echo "moving $prefix/lib64/* to $prefix/lib"; + mkdir -p $prefix/lib; + shopt -s dotglob; + for i in $prefix/lib64/*; + do + mv --no-clobber "$i" $prefix/lib; + done; + shopt -u dotglob; + rmdir $prefix/lib64; + ln -s lib $prefix/lib64 +} +_moveSbin () +{ + + if [ "${dontMoveSbin-}" = 1 ]; then + return; + fi; + if [ ! -e "$prefix/sbin" -o -L "$prefix/sbin" ]; then + return; + fi; + echo "moving $prefix/sbin/* to $prefix/bin"; + mkdir -p $prefix/bin; + shopt -s dotglob; + for i in $prefix/sbin/*; + do + mv "$i" $prefix/bin; + done; + shopt -u dotglob; + rmdir $prefix/sbin; + ln -s bin $prefix/sbin +} +_moveSystemdUserUnits () +{ + + if [ "${dontMoveSystemdUserUnits:-0}" = 1 ]; then + return; + fi; + if [ ! -e "${prefix:?}/lib/systemd/user" ]; then + return; + fi; + local source="$prefix/lib/systemd/user"; + local target="$prefix/share/systemd/user"; + echo "moving $source/* to $target"; + mkdir -p "$target"; + ( shopt -s dotglob; + for i in "$source"/*; + do + mv "$i" "$target"; + done ); + rmdir "$source"; + ln -s "$target" "$source" +} +_moveToShare () +{ + + forceShare=${forceShare:=man doc info}; + if [[ -z "$out" ]]; then + return; + fi; + for d in $forceShare; + do + if [ -d "$out/$d" ]; then + if [ -d "$out/share/$d" ]; then + echo "both $d/ and share/$d/ exist!"; + else + echo "moving $out/$d to $out/share/$d"; + mkdir -p $out/share; + mv $out/$d $out/share/; + fi; + fi; + done +} +_multioutConfig () +{ + + if [ "$outputs" = "out" ] || [ -z "${setOutputFlags-1}" ]; then + return; + fi; + if [ -z "$shareDocName" ]; then + local confScript="$configureScript"; + if [ -z "$confScript" ] && [ -x ./configure ]; then + confScript=./configure; + fi; + if [ -f "$confScript" ]; then + local shareDocName="$(sed -n "s/^PACKAGE_TARNAME='\(.*\)'$/\1/p" < "$confScript")"; + fi; + if [ -z "$shareDocName" ] || echo "$shareDocName" | grep -q '[^a-zA-Z0-9_-]'; then + shareDocName="$(echo "$name" | sed 's/-[^a-zA-Z].*//')"; + fi; + fi; + configureFlags=" --bindir=${!outputBin}/bin --sbindir=${!outputBin}/sbin --includedir=${!outputInclude}/include --oldincludedir=${!outputInclude}/include --mandir=${!outputMan}/share/man --infodir=${!outputInfo}/share/info --docdir=${!outputDoc}/share/doc/${shareDocName} --libdir=${!outputLib}/lib --libexecdir=${!outputLib}/libexec --localedir=${!outputLib}/share/locale $configureFlags"; + installFlags=" pkgconfigdir=${!outputDev}/lib/pkgconfig m4datadir=${!outputDev}/share/aclocal aclocaldir=${!outputDev}/share/aclocal $installFlags" +} +_multioutDevs () +{ + + if [ "$outputs" = "out" ] || [ -z "${moveToDev-1}" ]; then + return; + fi; + moveToOutput include "${!outputInclude}"; + moveToOutput lib/pkgconfig "${!outputDev}"; + moveToOutput share/pkgconfig "${!outputDev}"; + moveToOutput lib/cmake "${!outputDev}"; + moveToOutput share/aclocal "${!outputDev}"; + for f in "${!outputDev}"/{lib,share}/pkgconfig/*.pc; + do + echo "Patching '$f' includedir to output ${!outputInclude}"; + sed -i "/^includedir=/s,=\${prefix},=${!outputInclude}," "$f"; + done +} +_multioutDocs () +{ + + local REMOVE=REMOVE; + moveToOutput share/info "${!outputInfo}"; + moveToOutput share/doc "${!outputDoc}"; + moveToOutput share/gtk-doc "${!outputDevdoc}"; + moveToOutput share/devhelp/books "${!outputDevdoc}"; + moveToOutput share/man "${!outputMan}"; + moveToOutput share/man/man3 "${!outputDevman}" +} +_multioutPropagateDev () +{ + + if [ "$outputs" = "out" ]; then + return; + fi; + local outputFirst; + for outputFirst in $outputs; + do + break; + done; + local propagaterOutput="$outputDev"; + if [ -z "$propagaterOutput" ]; then + propagaterOutput="$outputFirst"; + fi; + if [ -z "${propagatedBuildOutputs+1}" ]; then + local po_dirty="$outputBin $outputInclude $outputLib"; + set +o pipefail; + propagatedBuildOutputs=`echo "$po_dirty" | tr -s ' ' '\n' | grep -v -F "$propagaterOutput" | sort -u | tr '\n' ' ' `; + set -o pipefail; + fi; + if [ -z "$propagatedBuildOutputs" ]; then + return; + fi; + mkdir -p "${!propagaterOutput}"/nix-support; + for output in $propagatedBuildOutputs; + do + echo -n " ${!output}" >> "${!propagaterOutput}"/nix-support/propagated-build-inputs; + done +} +_overrideFirst () +{ + + if [ -z "${!1-}" ]; then + _assignFirst "$@"; + fi +} +_pruneLibtoolFiles () +{ + + if [ "${dontPruneLibtoolFiles-}" ] || [ ! -e "$prefix" ]; then + return; + fi; + find "$prefix" -type f -name '*.la' -exec grep -q '^# Generated by .*libtool' {} \; -exec grep -q "^old_library=''" {} \; -exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \; +} +_updateSourceDateEpochFromSourceRoot () +{ + + if [ -n "$sourceRoot" ]; then + updateSourceDateEpoch "$sourceRoot"; + fi +} +activatePackage () +{ + + local pkg="$1"; + local -r hostOffset="$2"; + local -r targetOffset="$3"; + (( hostOffset <= targetOffset )) || exit -1; + if [ -f "$pkg" ]; then + source "$pkg"; + fi; + if [[ -z "${strictDeps-}" || "$hostOffset" -le -1 ]]; then + addToSearchPath _PATH "$pkg/bin"; + fi; + if (( hostOffset <= -1 )); then + addToSearchPath _XDG_DATA_DIRS "$pkg/share"; + fi; + if [[ "$hostOffset" -eq 0 && -d "$pkg/bin" ]]; then + addToSearchPath _HOST_PATH "$pkg/bin"; + fi; + if [[ -f "$pkg/nix-support/setup-hook" ]]; then + source "$pkg/nix-support/setup-hook"; + fi +} +addEnvHooks () +{ + + local depHostOffset="$1"; + shift; + local pkgHookVarsSlice="${pkgHookVarVars[$depHostOffset + 1]}[@]"; + local pkgHookVar; + for pkgHookVar in "${!pkgHookVarsSlice}"; + do + eval "${pkgHookVar}s"'+=("$@")'; + done +} +addToSearchPath () +{ + + addToSearchPathWithCustomDelimiter ":" "$@" +} +addToSearchPathWithCustomDelimiter () +{ + + local delimiter="$1"; + local varName="$2"; + local dir="$3"; + if [[ -d "$dir" && "${!varName:+${delimiter}${!varName}${delimiter}}" != *"${delimiter}${dir}${delimiter}"* ]]; then + export "${varName}=${!varName:+${!varName}${delimiter}}${dir}"; + fi +} +auditTmpdir () +{ + + local dir="$1"; + [ -e "$dir" ] || return 0; + header "checking for references to $TMPDIR/ in $dir..."; + local i; + while IFS= read -r -d '' i; do + if [[ "$i" =~ .build-id ]]; then + continue; + fi; + if isELF "$i"; then + if { + printf :; + patchelf --print-rpath "$i" + } | grep -q -F ":$TMPDIR/"; then + echo "RPATH of binary $i contains a forbidden reference to $TMPDIR/"; + exit 1; + fi; + fi; + if isScript "$i"; then + if [ -e "$(dirname "$i")/.$(basename "$i")-wrapped" ]; then + if grep -q -F "$TMPDIR/" "$i"; then + echo "wrapper script $i contains a forbidden reference to $TMPDIR/"; + exit 1; + fi; + fi; + fi; + done < <(find "$dir" -type f -print0); + stopNest +} +bintoolsWrapper_addLDVars () +{ + + local role_post; + getHostRoleEnvHook; + if [[ -d "$1/lib64" && ! -L "$1/lib64" ]]; then + export NIX_LDFLAGS${role_post}+=" -L$1/lib64"; + fi; + if [[ -d "$1/lib" ]]; then + local -a glob=($1/lib/lib*); + if [ "${#glob[*]}" -gt 0 ]; then + export NIX_LDFLAGS${role_post}+=" -L$1/lib"; + fi; + fi +} +buildPhase () +{ + + runHook preBuild; + : ${makeFlags=}; + if [[ -z "$makeFlags" && -z "${makefile:-}" && ! ( -e Makefile || -e makefile || -e GNUmakefile ) ]]; then + echo "no Makefile, doing nothing"; + else + foundMakefile=1; + local flagsArray=(${enableParallelBuilding:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} SHELL=$SHELL $makeFlags "${makeFlagsArray[@]}" $buildFlags "${buildFlagsArray[@]}"); + echoCmd 'build flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + fi; + runHook postBuild +} +ccWrapper_addCVars () +{ + + local role_post; + getHostRoleEnvHook; + if [ -d "$1/include" ]; then + export NIX_CFLAGS_COMPILE${role_post}+=" -isystem $1/include"; + fi; + if [ -d "$1/Library/Frameworks" ]; then + export NIX_CFLAGS_COMPILE${role_post}+=" -iframework $1/Library/Frameworks"; + fi +} +checkPhase () +{ + + runHook preCheck; + if [[ -z "${foundMakefile:-}" ]]; then + echo "no Makefile or custom checkPhase, doing nothing"; + runHook postCheck; + return; + fi; + if [[ -z "${checkTarget:-}" ]]; then + if make -n ${makefile:+-f $makefile} check > /dev/null 2>&1; then + checkTarget=check; + else + if make -n ${makefile:+-f $makefile} test > /dev/null 2>&1; then + checkTarget=test; + fi; + fi; + fi; + if [[ -z "${checkTarget:-}" ]]; then + echo "no check/test target in ${makefile:-Makefile}, doing nothing"; + else + local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} SHELL=$SHELL $makeFlags "${makeFlagsArray[@]}" ${checkFlags:-VERBOSE=y} "${checkFlagsArray[@]}" ${checkTarget}); + echoCmd 'check flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + fi; + runHook postCheck +} +closeNest () +{ + + true +} +compressManPages () +{ + + local dir="$1"; + if [ -L "$dir"/share ] || [ -L "$dir"/share/man ] || [ ! -d "$dir/share/man" ]; then + return; + fi; + echo "gzipping man pages under $dir/share/man/"; + find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | while IFS= read -r -d '' f; do + if gzip -c -n "$f" > "$f".gz; then + rm "$f"; + else + rm "$f".gz; + fi; + done; + find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 | sort -z | while IFS= read -r -d '' f; do + local target; + target="$(readlink -f "$f")"; + if [ -f "$target".gz ]; then + ln -sf "$target".gz "$f".gz && rm "$f"; + fi; + done +} +configurePhase () +{ + + runHook preConfigure; + : ${configureScript=}; + : ${configureFlags=}; + if [[ -z "$configureScript" && -x ./configure ]]; then + configureScript=./configure; + fi; + if [ -z "${dontFixLibtool:-}" ]; then + export lt_cv_deplibs_check_method="${lt_cv_deplibs_check_method-pass_all}"; + local i; + find . -iname "ltmain.sh" -print0 | while IFS='' read -r -d '' i; do + echo "fixing libtool script $i"; + fixLibtool "$i"; + done; + fi; + if [[ -z "${dontAddPrefix:-}" && -n "$prefix" ]]; then + configureFlags="${prefixKey:---prefix=}$prefix $configureFlags"; + fi; + if [[ -f "$configureScript" ]]; then + if [ -z "${dontAddDisableDepTrack:-}" ]; then + if grep -q dependency-tracking "$configureScript"; then + configureFlags="--disable-dependency-tracking $configureFlags"; + fi; + fi; + if [ -z "${dontDisableStatic:-}" ]; then + if grep -q enable-static "$configureScript"; then + configureFlags="--disable-static $configureFlags"; + fi; + fi; + fi; + if [ -n "$configureScript" ]; then + local flagsArray=($configureFlags "${configureFlagsArray[@]}"); + echoCmd 'configure flags' "${flagsArray[@]}"; + $configureScript "${flagsArray[@]}"; + unset flagsArray; + else + echo "no configure script, doing nothing"; + fi; + runHook postConfigure +} +consumeEntire () +{ + + if IFS='' read -r -d '' $1; then + echo "consumeEntire(): ERROR: Input null bytes, won't process" 1>&2; + return 1; + fi +} +distPhase () +{ + + runHook preDist; + local flagsArray=($distFlags "${distFlagsArray[@]}" ${distTarget:-dist}); + echo 'dist flags: %q' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + if [ "${dontCopyDist:-0}" != 1 ]; then + mkdir -p "$out/tarballs"; + cp -pvd ${tarballs:-*.tar.gz} "$out/tarballs"; + fi; + runHook postDist +} +dumpVars () +{ + + if [ "${noDumpEnvVars:-0}" != 1 ]; then + export 2> /dev/null >| "$NIX_BUILD_TOP/env-vars" || true; + fi +} +echoCmd () +{ + + printf "%s:" "$1"; + shift; + printf ' %q' "$@"; + echo +} +exitHandler () +{ + + exitCode="$?"; + set +e; + if [ -n "${showBuildStats:-}" ]; then + read -r -d '' -a buildTimes < <(times); + echo "build times:"; + echo "user time for the shell ${buildTimes[0]}"; + echo "system time for the shell ${buildTimes[1]}"; + echo "user time for all child processes ${buildTimes[2]}"; + echo "system time for all child processes ${buildTimes[3]}"; + fi; + if (( "$exitCode" != 0 )); then + runHook failureHook; + if [ -n "${succeedOnFailure:-}" ]; then + echo "build failed with exit code $exitCode (ignored)"; + mkdir -p "$out/nix-support"; + printf "%s" "$exitCode" > "$out/nix-support/failed"; + exit 0; + fi; + else + runHook exitHook; + fi; + exit "$exitCode" +} +findInputs () +{ + + local -r pkg="$1"; + local -r hostOffset="$2"; + local -r targetOffset="$3"; + (( hostOffset <= targetOffset )) || exit -1; + local varVar="${pkgAccumVarVars[hostOffset + 1]}"; + local varRef="$varVar[$((targetOffset - hostOffset))]"; + local var="${!varRef}"; + unset -v varVar varRef; + local varSlice="$var[*]"; + case "${!varSlice-}" in + *" $pkg "*) + return 0 + ;; + esac; + unset -v varSlice; + eval "$var"'+=("$pkg")'; + if ! [ -e "$pkg" ]; then + echo "build input $pkg does not exist" 1>&2; + exit 1; + fi; + function mapOffset () + { + local -r inputOffset="$1"; + local -n outputOffset="$2"; + if (( inputOffset <= 0 )); then + outputOffset=$((inputOffset + hostOffset)); + else + outputOffset=$((inputOffset - 1 + targetOffset)); + fi + }; + local relHostOffset; + for relHostOffset in "${allPlatOffsets[@]}"; + do + local files="${propagatedDepFilesVars[relHostOffset + 1]}"; + local hostOffsetNext; + mapOffset "$relHostOffset" hostOffsetNext; + (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; + local relTargetOffset; + for relTargetOffset in "${allPlatOffsets[@]}"; + do + (( "$relHostOffset" <= "$relTargetOffset" )) || continue; + local fileRef="${files}[$relTargetOffset - $relHostOffset]"; + local file="${!fileRef}"; + unset -v fileRef; + local targetOffsetNext; + mapOffset "$relTargetOffset" targetOffsetNext; + (( -1 <= hostOffsetNext && hostOffsetNext <= 1 )) || continue; + [[ -f "$pkg/nix-support/$file" ]] || continue; + local pkgNext; + read -r -d '' pkgNext < "$pkg/nix-support/$file" || true; + for pkgNext in $pkgNext; + do + findInputs "$pkgNext" "$hostOffsetNext" "$targetOffsetNext"; + done; + done; + done +} +fixLibtool () +{ + + local search_path; + for flag in $NIX_LDFLAGS; + do + case $flag in + -L*) + search_path+=" ${flag#-L}" + ;; + esac; + done; + sed -i "$1" -e "s^eval \(sys_lib_search_path=\).*^\1'$search_path'^" -e 's^eval sys_lib_.+search_path=.*^^' +} +fixupPhase () +{ + + local output; + for output in $outputs; + do + if [ -e "${!output}" ]; then + chmod -R u+w "${!output}"; + fi; + done; + runHook preFixup; + local output; + for output in $outputs; + do + prefix="${!output}" runHook fixupOutput; + done; + declare -ra flatVars=(depsBuildBuildPropagated propagatedNativeBuildInputs depsBuildTargetPropagated depsHostHostPropagated propagatedBuildInputs depsTargetTargetPropagated); + declare -ra flatFiles=("${propagatedBuildDepFiles[@]}" "${propagatedHostDepFiles[@]}" "${propagatedTargetDepFiles[@]}"); + local propagatedInputsIndex; + for propagatedInputsIndex in "${!flatVars[@]}"; + do + local propagatedInputsSlice="${flatVars[$propagatedInputsIndex]}[@]"; + local propagatedInputsFile="${flatFiles[$propagatedInputsIndex]}"; + [[ -n "${!propagatedInputsSlice}" ]] || continue; + mkdir -p "${!outputDev}/nix-support"; + printWords ${!propagatedInputsSlice} > "${!outputDev}/nix-support/$propagatedInputsFile"; + done; + if [ -n "${setupHook:-}" ]; then + mkdir -p "${!outputDev}/nix-support"; + substituteAll "$setupHook" "${!outputDev}/nix-support/setup-hook"; + fi; + if [ -n "${setupHooks:-}" ]; then + mkdir -p "${!outputDev}/nix-support"; + local hook; + for hook in $setupHooks; + do + local content; + consumeEntire content < "$hook"; + substituteAllStream content "file '$hook'" >> "${!outputDev}/nix-support/setup-hook"; + unset -v content; + done; + unset -v hook; + fi; + if [ -n "${propagatedUserEnvPkgs:-}" ]; then + mkdir -p "${!outputBin}/nix-support"; + printWords $propagatedUserEnvPkgs > "${!outputBin}/nix-support/propagated-user-env-packages"; + fi; + runHook postFixup +} +genericBuild () +{ + + if [ -f "${buildCommandPath:-}" ]; then + source "$buildCommandPath"; + return; + fi; + if [ -n "${buildCommand:-}" ]; then + eval "$buildCommand"; + return; + fi; + if [ -z "${phases:-}" ]; then + phases="${prePhases:-} unpackPhase patchPhase ${preConfigurePhases:-} configurePhase ${preBuildPhases:-} buildPhase checkPhase ${preInstallPhases:-} installPhase ${preFixupPhases:-} fixupPhase installCheckPhase ${preDistPhases:-} distPhase ${postPhases:-}"; + fi; + for curPhase in $phases; + do + if [[ "$curPhase" = unpackPhase && -n "${dontUnpack:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = patchPhase && -n "${dontPatch:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = configurePhase && -n "${dontConfigure:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = buildPhase && -n "${dontBuild:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = checkPhase && -z "${doCheck:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = installPhase && -n "${dontInstall:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = fixupPhase && -n "${dontFixup:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = installCheckPhase && -z "${doInstallCheck:-}" ]]; then + continue; + fi; + if [[ "$curPhase" = distPhase && -z "${doDist:-}" ]]; then + continue; + fi; + if [[ -n $NIX_LOG_FD ]]; then + echo "@nix { \"action\": \"setPhase\", \"phase\": \"$curPhase\" }" 1>&$NIX_LOG_FD; + fi; + showPhaseHeader "$curPhase"; + dumpVars; + eval "${!curPhase:-$curPhase}"; + if [ "$curPhase" = unpackPhase ]; then + cd "${sourceRoot:-.}"; + fi; + done +} +getHostRole () +{ + + getRole "$hostOffset" +} +getHostRoleEnvHook () +{ + + getRole "$depHostOffset" +} +getRole () +{ + + case $1 in + -1) + role_post='_FOR_BUILD' + ;; + 0) + role_post='' + ;; + 1) + role_post='_FOR_TARGET' + ;; + *) + echo "binutils-wrapper-2.35.2: used as improper sort of dependency" 1>&2; + return 1 + ;; + esac +} +getTargetRole () +{ + + getRole "$targetOffset" +} +getTargetRoleEnvHook () +{ + + getRole "$depTargetOffset" +} +getTargetRoleWrapper () +{ + + case $targetOffset in + -1) + export NIX_BINTOOLS_WRAPPER_TARGET_BUILD_x86_64_unknown_linux_gnu=1 + ;; + 0) + export NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu=1 + ;; + 1) + export NIX_BINTOOLS_WRAPPER_TARGET_TARGET_x86_64_unknown_linux_gnu=1 + ;; + *) + echo "binutils-wrapper-2.35.2: used as improper sort of dependency" 1>&2; + return 1 + ;; + esac +} +header () +{ + + echo "$1" +} +installCheckPhase () +{ + + runHook preInstallCheck; + if [[ -z "${foundMakefile:-}" ]]; then + echo "no Makefile or custom installCheckPhase, doing nothing"; + else + if [[ -z "${installCheckTarget:-}" ]] && ! make -n ${makefile:+-f $makefile} ${installCheckTarget:-installcheck} > /dev/null 2>&1; then + echo "no installcheck target in ${makefile:-Makefile}, doing nothing"; + else + local flagsArray=(${enableParallelChecking:+-j${NIX_BUILD_CORES} -l${NIX_BUILD_CORES}} SHELL=$SHELL $makeFlags "${makeFlagsArray[@]}" $installCheckFlags "${installCheckFlagsArray[@]}" ${installCheckTarget:-installcheck}); + echoCmd 'installcheck flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + fi; + fi; + runHook postInstallCheck +} +installPhase () +{ + + runHook preInstall; + if [ -n "$prefix" ]; then + mkdir -p "$prefix"; + fi; + local flagsArray=(SHELL=$SHELL $makeFlags "${makeFlagsArray[@]}" $installFlags "${installFlagsArray[@]}" ${installTargets:-install}); + echoCmd 'install flags' "${flagsArray[@]}"; + make ${makefile:+-f $makefile} "${flagsArray[@]}"; + unset flagsArray; + runHook postInstall +} +isELF () +{ + + local fn="$1"; + local fd; + local magic; + exec {fd}< "$fn"; + read -r -n 4 -u "$fd" magic; + exec {fd}>&-; + if [ "$magic" = 'ELF' ]; then + return 0; + else + return 1; + fi +} +isMachO () +{ + + local fn="$1"; + local fd; + local magic; + exec {fd}< "$fn"; + read -r -n 4 -u "$fd" magic; + exec {fd}>&-; + if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xcf") || "$magic" = $(echo -ne "\xcf\xfa\xed\xfe") ]]; then + return 0; + else + if [[ "$magic" = $(echo -ne "\xfe\xed\xfa\xce") || "$magic" = $(echo -ne "\xce\xfa\xed\xfe") ]]; then + return 0; + else + if [[ "$magic" = $(echo -ne "\xca\xfe\xba\xbe") || "$magic" = $(echo -ne "\xbe\xba\xfe\xca") ]]; then + return 0; + else + return 1; + fi; + fi; + fi +} +isScript () +{ + + local fn="$1"; + local fd; + local magic; + exec {fd}< "$fn"; + read -r -n 2 -u "$fd" magic; + exec {fd}>&-; + if [[ "$magic" =~ \#! ]]; then + return 0; + else + return 1; + fi +} +mapOffset () +{ + + local -r inputOffset="$1"; + local -n outputOffset="$2"; + if (( inputOffset <= 0 )); then + outputOffset=$((inputOffset + hostOffset)); + else + outputOffset=$((inputOffset - 1 + targetOffset)); + fi +} +moveToOutput () +{ + + local patt="$1"; + local dstOut="$2"; + local output; + for output in $outputs; + do + if [ "${!output}" = "$dstOut" ]; then + continue; + fi; + local srcPath; + for srcPath in "${!output}"/$patt; + do + if [ ! -e "$srcPath" ] && [ ! -L "$srcPath" ]; then + continue; + fi; + if [ "$dstOut" = REMOVE ]; then + echo "Removing $srcPath"; + rm -r "$srcPath"; + else + local dstPath="$dstOut${srcPath#${!output}}"; + echo "Moving $srcPath to $dstPath"; + if [ -d "$dstPath" ] && [ -d "$srcPath" ]; then + rmdir "$srcPath" --ignore-fail-on-non-empty; + if [ -d "$srcPath" ]; then + mv -t "$dstPath" "$srcPath"/*; + rmdir "$srcPath"; + fi; + else + mkdir -p "$(readlink -m "$dstPath/..")"; + mv "$srcPath" "$dstPath"; + fi; + fi; + local srcParent="$(readlink -m "$srcPath/..")"; + if rmdir "$srcParent"; then + echo "Removing empty $srcParent/ and (possibly) its parents"; + rmdir -p --ignore-fail-on-non-empty "$(readlink -m "$srcParent/..")" 2> /dev/null || true; + fi; + done; + done +} +patchELF () +{ + + local dir="$1"; + [ -e "$dir" ] || return 0; + header "shrinking RPATHs of ELF executables and libraries in $dir"; + local i; + while IFS= read -r -d '' i; do + if [[ "$i" =~ .build-id ]]; then + continue; + fi; + if ! isELF "$i"; then + continue; + fi; + echo "shrinking $i"; + patchelf --shrink-rpath "$i" || true; + done < <(find "$dir" -type f -print0); + stopNest +} +patchPhase () +{ + + runHook prePatch; + for i in ${patches:-}; + do + header "applying patch $i" 3; + local uncompress=cat; + case "$i" in + *.gz) + uncompress="gzip -d" + ;; + *.bz2) + uncompress="bzip2 -d" + ;; + *.xz) + uncompress="xz -d" + ;; + *.lzma) + uncompress="lzma -d" + ;; + esac; + $uncompress < "$i" 2>&1 | patch ${patchFlags:--p1}; + done; + runHook postPatch +} +patchShebangs () +{ + + local pathName; + if [[ "$1" == "--host" ]]; then + pathName=HOST_PATH; + shift; + else + if [[ "$1" == "--build" ]]; then + pathName=PATH; + shift; + fi; + fi; + echo "patching script interpreter paths in $@"; + local f; + local oldPath; + local newPath; + local arg0; + local args; + local oldInterpreterLine; + local newInterpreterLine; + if [[ $# -eq 0 ]]; then + echo "No arguments supplied to patchShebangs" 1>&2; + return 0; + fi; + local f; + while IFS= read -r -d '' f; do + isScript "$f" || continue; + read -r oldInterpreterLine < "$f"; + read -r oldPath arg0 args <<< "${oldInterpreterLine:2}"; + if [[ -z "$pathName" ]]; then + if [[ -n $strictDeps && $f == "$NIX_STORE"* ]]; then + pathName=HOST_PATH; + else + pathName=PATH; + fi; + fi; + if [[ "$oldPath" == *"/bin/env" ]]; then + if [[ $arg0 == "-"* || $arg0 == *"="* ]]; then + echo "$f: unsupported interpreter directive \"$oldInterpreterLine\" (set dontPatchShebangs=1 and handle shebang patching yourself)" 1>&2; + exit 1; + fi; + newPath="$(PATH="${!pathName}" command -v "$arg0" || true)"; + else + if [[ -z $oldPath ]]; then + oldPath="/bin/sh"; + fi; + newPath="$(PATH="${!pathName}" command -v "$(basename "$oldPath")" || true)"; + args="$arg0 $args"; + fi; + newInterpreterLine="$newPath $args"; + newInterpreterLine=${newInterpreterLine%${newInterpreterLine##*[![:space:]]}}; + if [[ -n "$oldPath" && "${oldPath:0:${#NIX_STORE}}" != "$NIX_STORE" ]]; then + if [[ -n "$newPath" && "$newPath" != "$oldPath" ]]; then + echo "$f: interpreter directive changed from \"$oldInterpreterLine\" to \"$newInterpreterLine\""; + escapedInterpreterLine=${newInterpreterLine//\\/\\\\}; + timestamp=$(stat --printf "%y" "$f"); + sed -i -e "1 s|.*|#\!$escapedInterpreterLine|" "$f"; + touch --date "$timestamp" "$f"; + fi; + fi; + done < <(find "$@" -type f -perm -0100 -print0); + stopNest +} +patchShebangsAuto () +{ + + if [[ -z "${dontPatchShebangs-}" && -e "$prefix" ]]; then + if [[ "$output" != out && "$output" = "$outputDev" ]]; then + patchShebangs --build "$prefix"; + else + patchShebangs --host "$prefix"; + fi; + fi +} +printLines () +{ + + (( "$#" > 0 )) || return 0; + printf '%s\n' "$@" +} +printWords () +{ + + (( "$#" > 0 )) || return 0; + printf '%s ' "$@" +} +runHook () +{ + + local hookName="$1"; + shift; + local hooksSlice="${hookName%Hook}Hooks[@]"; + local hook; + for hook in "_callImplicitHook 0 $hookName" ${!hooksSlice+"${!hooksSlice}"}; + do + _eval "$hook" "$@"; + done; + return 0 +} +runOneHook () +{ + + local hookName="$1"; + shift; + local hooksSlice="${hookName%Hook}Hooks[@]"; + local hook ret=1; + for hook in "_callImplicitHook 1 $hookName" ${!hooksSlice+"${!hooksSlice}"}; + do + if _eval "$hook" "$@"; then + ret=0; + break; + fi; + done; + return "$ret" +} +showPhaseHeader () +{ + + local phase="$1"; + case "$phase" in + unpackPhase) + header "unpacking sources" + ;; + patchPhase) + header "patching sources" + ;; + configurePhase) + header "configuring" + ;; + buildPhase) + header "building" + ;; + checkPhase) + header "running tests" + ;; + installPhase) + header "installing" + ;; + fixupPhase) + header "post-installation fixup" + ;; + installCheckPhase) + header "running install tests" + ;; + *) + header "$phase" + ;; + esac +} +stopNest () +{ + + true +} +stripDirs () +{ + + local cmd="$1"; + local dirs="$2"; + local stripFlags="$3"; + local dirsNew=; + local d; + for d in ${dirs}; + do + if [ -d "$prefix/$d" ]; then + dirsNew="${dirsNew} $prefix/$d "; + fi; + done; + dirs=${dirsNew}; + if [ -n "${dirs}" ]; then + header "stripping (with command $cmd and flags $stripFlags) in$dirs"; + find $dirs -type f -exec $cmd $stripFlags '{}' \; 2> /dev/null; + stopNest; + fi +} +stripHash () +{ + + local strippedName casematchOpt=0; + strippedName="$(basename -- "$1")"; + shopt -q nocasematch && casematchOpt=1; + shopt -u nocasematch; + if [[ "$strippedName" =~ ^[a-z0-9]{32}- ]]; then + echo "${strippedName:33}"; + else + echo "$strippedName"; + fi; + if (( casematchOpt )); then + shopt -s nocasematch; + fi +} +substitute () +{ + + local input="$1"; + local output="$2"; + shift 2; + if [ ! -f "$input" ]; then + echo "substitute(): ERROR: file '$input' does not exist" 1>&2; + return 1; + fi; + local content; + consumeEntire content < "$input"; + if [ -e "$output" ]; then + chmod +w "$output"; + fi; + substituteStream content "file '$input'" "$@" > "$output" +} +substituteAll () +{ + + local input="$1"; + local output="$2"; + local -a args=(); + _allFlags; + substitute "$input" "$output" "${args[@]}" +} +substituteAllInPlace () +{ + + local fileName="$1"; + shift; + substituteAll "$fileName" "$fileName" "$@" +} +substituteAllStream () +{ + + local -a args=(); + _allFlags; + substituteStream "$1" "$2" "${args[@]}" +} +substituteInPlace () +{ + + local fileName="$1"; + shift; + substitute "$fileName" "$fileName" "$@" +} +substituteStream () +{ + + local var=$1; + local description=$2; + shift 2; + while (( "$#" )); do + case "$1" in + --replace) + pattern="$2"; + replacement="$3"; + shift 3; + local savedvar; + savedvar="${!var}"; + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; + if [ "$pattern" != "$replacement" ]; then + if [ "${!var}" == "$savedvar" ]; then + echo "substituteStream(): WARNING: pattern '$pattern' doesn't match anything in $description" 1>&2; + fi; + fi + ;; + --subst-var) + local varName="$2"; + shift 2; + if ! [[ "$varName" =~ ^[a-zA-Z_][a-zA-Z0-9_]*$ ]]; then + echo "substituteStream(): ERROR: substitution variables must be valid Bash names, \"$varName\" isn't." 1>&2; + return 1; + fi; + if [ -z ${!varName+x} ]; then + echo "substituteStream(): ERROR: variable \$$varName is unset" 1>&2; + return 1; + fi; + pattern="@$varName@"; + replacement="${!varName}"; + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}' + ;; + --subst-var-by) + pattern="@$2@"; + replacement="$3"; + eval "$var"'=${'"$var"'//"$pattern"/"$replacement"}'; + shift 3 + ;; + *) + echo "substituteStream(): ERROR: Invalid command line argument: $1" 1>&2; + return 1 + ;; + esac; + done; + printf "%s" "${!var}" +} +unpackFile () +{ + + curSrc="$1"; + header "unpacking source archive $curSrc" 3; + if ! runOneHook unpackCmd "$curSrc"; then + echo "do not know how to unpack source archive $curSrc"; + exit 1; + fi +} +unpackPhase () +{ + + runHook preUnpack; + if [ -z "${srcs:-}" ]; then + if [ -z "${src:-}" ]; then + echo 'variable $src or $srcs should point to the source'; + exit 1; + fi; + srcs="$src"; + fi; + local dirsBefore=""; + for i in *; + do + if [ -d "$i" ]; then + dirsBefore="$dirsBefore $i "; + fi; + done; + for i in $srcs; + do + unpackFile "$i"; + done; + : ${sourceRoot=}; + if [ -n "${setSourceRoot:-}" ]; then + runOneHook setSourceRoot; + else + if [ -z "$sourceRoot" ]; then + for i in *; + do + if [ -d "$i" ]; then + case $dirsBefore in + *\ $i\ *) + + ;; + *) + if [ -n "$sourceRoot" ]; then + echo "unpacker produced multiple directories"; + exit 1; + fi; + sourceRoot="$i" + ;; + esac; + fi; + done; + fi; + fi; + if [ -z "$sourceRoot" ]; then + echo "unpacker appears to have produced no directories"; + exit 1; + fi; + echo "source root is $sourceRoot"; + if [ "${dontMakeSourcesWritable:-0}" != 1 ]; then + chmod -R u+w -- "$sourceRoot"; + fi; + runHook postUnpack +} +updateSourceDateEpoch () +{ + + local path="$1"; + local -a res=($(find "$path" -type f -not -newer "$NIX_BUILD_TOP/.." -printf '%T@ %p\0' | sort -n --zero-terminated | tail -n1 --zero-terminated | head -c -1)); + local time="${res[0]//\.[0-9]*/}"; + local newestFile="${res[1]}"; + if [ "${time:-0}" -gt "$SOURCE_DATE_EPOCH" ]; then + echo "setting SOURCE_DATE_EPOCH to timestamp $time of file $newestFile"; + export SOURCE_DATE_EPOCH="$time"; + local now="$(date +%s)"; + if [ "$time" -gt $((now - 60)) ]; then + echo "warning: file $newestFile may be generated; SOURCE_DATE_EPOCH may be non-deterministic"; + fi; + fi +} +PATH="$PATH:$nix_saved_PATH" +export NIX_BUILD_TOP="$(mktemp -d -t nix-shell.XXXXXX)" +export TMP="$NIX_BUILD_TOP" +export TMPDIR="$NIX_BUILD_TOP" +export TEMP="$NIX_BUILD_TOP" +export TEMPDIR="$NIX_BUILD_TOP" diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.hugo_build.lock b/.hugo_build.lock new file mode 100644 index 0000000..e69de29 diff --git a/config.toml b/config.toml index 2d4f164..2831c0f 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ title = "Hagfi.sh" -baseURL = "https://hagfi.sh/" +baseURL = "https://blog.hagfi.sh/" languageCode = "en-us" theme = "redlounge" metaDataFormat = "yaml" @@ -27,4 +27,4 @@ disqusShortname = "hagfish" #[[menu.main]] # name = "Tools" -# url = "/categories/tools" \ No newline at end of file +# url = "/categories/tools" diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6f37376 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1643000262, + "narHash": "sha256-8hrbufiCcZgicU8UvHaRkruYuzM8z3lJvQkSh9ezMEg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cc68710784ffe0ee035ee7b726656c44566cac94", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6046d82 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "A basic flake with a shell"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: let + pkgs = nixpkgs.legacyPackages.${system}; + in { + devShell = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ hugo ]; + buildInputs = [ ]; + }; + }); +} diff --git a/public/administration/autofs/index.html b/public/administration/autofs/index.html new file mode 100644 index 0000000..5bd09e7 --- /dev/null +++ b/public/administration/autofs/index.html @@ -0,0 +1,395 @@ + + + + + Mount with automount (autofs) // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+

+ Mount with automount (autofs) +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + +

Automagically mount remote directories on login.

+

Install the required pakages

+
sudo yum -y install autofs
+

Create the entry file

+

the mapper file is a file where we specify the directory where all our mounts should be placed.

+

This file should be stored in /etc/auto.master.d, note that the extension is required to be .autofs

+

for example: /etc/auto.master.d/home.autofs

+
/home/guests /etc/auto.home
+
+

The value for /home/guests is the file where we specify our mount options.

+

Note: Make sure the /home/guests directory exists, if not create it with:

+
mkdir /home/guests
+

Create the mapper file

+

We earlier specified where our map file should be stored (/etc/auto.home), create this file.

+

Say we want to auto mount the home directories stored on serverA on /home/guests/[USER] when [USER] logs in.

+
* -rw,sync serverA:/home/guests/&
+
    +
  • The wildcards task is to create the directory based on the users homedirectory on serverA (specified with &)
  • +
  • We give option like: read/write and sync
  • +
  • As last param we have to say where we want to mount to, again, the & is dynamic and maps to the logged in user.
  • +
+

Enable and start the service

+
sudo systemctl enable autofs
+sudo systemctl start autofs
+

Wrapping up

+

Log in as a user, and check if the mount is present as expected.

+
df -h
+

Should output something like:

+
Filesystem      Size  Used Avail Use% Mounted on
+/dev/xvda1      8.0G  5.6G  2.5G  70% /
+devtmpfs        224M     0  224M   0% /dev
+tmpfs           244M     0  244M   0% /dev/shm
+tmpfs           244M   41M  204M  17% /run
+tmpfs           244M     0  244M   0% /sys/fs/cgroup
+tmpfs            49M     0   49M   0% /run/user/1000
+tmpfs            49M     0   49M   0% /run/user/0
+/serverA:/home/guests/user1       200M   0     200M 0% /home/guests/user1
+

Note the last line where we see that the mount is present

+ + + + +
+ Tags// + + , + + , + + , + + , + +
+ + + +
+ More Reading + + + + + +
+ Older// + Changing boot targets +
+ +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/administration/bash/index.html b/public/administration/bash/index.html new file mode 100644 index 0000000..34a3441 --- /dev/null +++ b/public/administration/bash/index.html @@ -0,0 +1,463 @@ + + + + + Bash Tips & Tricks // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+

+ Bash Tips & Tricks +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + +

Usefull bash tips & tricks

+

Usefull CLI shortcuts:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ShortcutDescription
Ctrl+aJump to the beginning of the command line.
Ctrl+eJump to the end of the command line.
Ctrl+uClear from the cursor to the beginning of the command line.
Ctrl+kClear from the cursor to the end of the command line.
Ctrl+Left ArrowJump to the beginning of the previous word on the command line.
Ctrl+Right ArrowJump to the end of the next word on the command line.
Ctrl+rSearch the history list of commands for a pattern.
Esc + .Copy the last word of the previous command on the current command line where the cursor is
+

Redirect output:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Commandresult
> fileredirect stdout to overwrite a file
>> fileredirect stdout to append to a file
2> fileredirect stderr to overwrite a file
2> /dev/nulldiscard stderr error messages by redirecting to /dev/null
&> file (OR > file 2>&1)redirect stdout and stderr to overwrite the same file
&>> (OR >> file 2>&1)redirect stdout and stderr to append to the same file
+

Create a function:

+

It’s straightforward, use function to create a function, give it a usefull short name and put the statemants between curly brackets.
+Use $1 for the first argument, $2 for the second argument and so on…

+
function <name> {
+	<bashcommands>
+}
+

For example the function logsearch which searches for the given string whitin all logfiles in the current directory:

+
function logsearch {
+	zgrep $1 ./*log
+}
+

Short scripts:

+
    +
  • Loop every file in path:
  • +
+
for F in /path/to/files/*;
+do
+	echo "Files $F";
+done
+
    +
  • Loop file line per line:
  • +
+
while read LINE;
+do
+	echo $LINE;
+done < file.txt
+
+ + + + +
+ Tags// + + , + + , + +
+ + + +
+ More Reading + +
+ Newer// + Changing boot targets +
+ + + +
+ Older// + Yet Another Arch Guide +
+ +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/administration/boot-targets/index.html b/public/administration/boot-targets/index.html new file mode 100644 index 0000000..730c82d --- /dev/null +++ b/public/administration/boot-targets/index.html @@ -0,0 +1,372 @@ + + + + + Changing boot targets // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+

+ Changing boot targets +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + +

Switch between run levels / environments.

+

Changing boot targets

+

On the fly

+

Goto a graphical environment

+
systemctl isolate graphical.target
+

Goto a text based environment

+
systemctl isolate multi-user.target
+

Permanently change environments

+

Graphical environment

+
systemctl set-default graphical.target
+

Text based environment

+
systemctl set-default multi-user.target
+

Set target on boot

+
    +
  1. Interrupt the bootloader (GRUB) and edit the kernel entry before booting. Press e to edit the entry
  2. +
  3. Goto the line that starts with linux16 suffix the line with your desired target as followed:
  4. +
+
systemd.unit=rescue.target
+
+ + + + +
+ Tags// + + , + + , + + , + +
+ + + +
+ More Reading + + + + + +
+ Older// + Bash Tips & Tricks +
+ +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/administration/index.html b/public/administration/index.html index 344e51c..6c7ba3d 100644 --- a/public/administration/index.html +++ b/public/administration/index.html @@ -14,13 +14,13 @@ - + - + @@ -32,7 +32,8 @@ - + + @@ -42,49 +43,97 @@ - + - - - + + + + + + - - - +
- - + diff --git a/public/administration/index.xml b/public/administration/index.xml index 2c5ba5c..90ecd1f 100644 --- a/public/administration/index.xml +++ b/public/administration/index.xml @@ -1,483 +1,96 @@ - + Administrations on Hagfi.sh - https://hagfi.sh/administration/index.xml + https://blog.hagfi.sh/administration/ Recent content in Administrations on Hagfi.sh Hugo -- gohugo.io en-us - Sat, 25 Aug 2018 22:08:15 +0200 - + Fri, 30 Nov 2018 10:08:22 +0200 + + Yet Another Arch Guide + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + Fri, 30 Nov 2018 10:08:22 +0200 + + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + <p>Setting up Arch with other bells and whistles.</p> + - Let's Encrypt - https://hagfi.sh/administration/letsencrypt/ - Sat, 25 Aug 2018 22:08:15 +0200 + Bash Tips & Tricks + https://blog.hagfi.sh/administration/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 - https://hagfi.sh/administration/letsencrypt/ - - -<h2 id="let-s-encrypt">Let&rsquo;s Encrypt:</h2> - -<ul> -<li>Aanmaken / vernieuwen certificaat:</li> -</ul> - -<pre><code>/opt/letsencrypt/letsencrypt-auto certonly - --expand - ---email support@nucleus.be - --agree-tos - --webroot - -w /var/www/vhosts/WEB/ROOT - -d domain.tld - -d domainalias.tld - --dry-run -</code></pre> - -<pre><code>/bin/certbot - --text - --agree-tos - --non-interactive - certonly - -a webroot - --webroot-path /var/www/vhosts/WEB/ROOT - -d domain.tld - -d domainalias.tld - --dry-run -</code></pre> - -<p><code>--dry-run</code> om het aanmaken te testen.</p> - -<h3 id="apache-httpd">Apache / httpd</h3> - -<ul> -<li>(1) Voeg volgende regels toe aan de apache config:</li> -</ul> - -<pre><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known -&lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; - order allow,deny - allow from all - satisfy any -&lt;/Directory&gt; -</code></pre> - -<ul> -<li>Of (2) voeg volgende regels toe aan .htaccess:</li> -</ul> - -<pre><code>&lt;IfModule mod_rewrite.c&gt; - RewriteEngine on - #Allow Let's Encrypt SSL renewal - RewriteRule ^.well-known/ - [L,NC] - RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ - RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] -</code></pre> - -<ul> -<li>Combineer Basic Auth met Let&rsquo;s Encrypt:<br /> -<em>Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)</em></li> -</ul> - -<pre><code> &lt;Directory /var/www/vhosts/WEB/ROOT&gt; - AuthType Basic - AuthName protected - AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd - require valid-user - Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# - &lt;/Directory&gt; -</code></pre> - -<h3 id="nginx">Nginx</h3> - -<ul> -<li>Voeg volgende regels toe aan Nginx</li> -</ul> - -<pre><code> location /.well-known { - root /var/www/vhosts/WEB/ROOT; - index index.html index.htm index.php; - } -</code></pre> - -<p>-</p> - -<ul> -<li>Controleer DNS lijst domeinen:</li> -</ul> - -<pre><code>while read LINE; -do - echo $LINE &gt;&gt; list_processed.txt &amp;&amp; dig +short @9.9.9.9 $LINE &gt;&gt; list_processed.txt; -done &lt; list.txt -</code></pre> - -<ul> -<li>(WIP) -<br /></li> -</ul> - -<pre><code>#!/bin/bash - -#IP=&lt;%= @default_ipadress %&gt; -IP=$(dig +short @9.9.9.9 $(hostname)) -FILE=$1 - -while read LINE -do - CHK=$(dig +short @9.9.9.9 $LINE) - if $IP -eq $CHK - echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-ok - elif - echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-nok - fi -done &lt; $FILE - -echo &quot;Domains OK:&quot; -echo /tmp/le-ok | column -echo &quot;-------------------------------&quot; -echo &quot;Domains NOT OK:&quot; -echo /tmp/le-nok | column - -rm -rf /tmp/le-ok -rm -rf /tmp/le-nok -</code></pre> - + https://blog.hagfi.sh/administration/bash/ + <p>Usefull bash tips &amp; tricks</p> - MySQL Tuner - https://hagfi.sh/administration/mysql_tuner/ + Changing boot targets + https://blog.hagfi.sh/administration/boot-targets/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/boot-targets/ + <p>Switch between run levels / environments.</p> + + + + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + Let's Encrypt + https://blog.hagfi.sh/administration/letsencrypt/ Sat, 25 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/mysql_tuner/ - - -<h2 id="mysql-tuner">MySQL Tuner</h2> - -<table> -<thead> -<tr> -<th>WAARDE</th> -<th>ACTIE</th> -</tr> -</thead> - -<tbody> -<tr> -<td><code>query_cache_size</code></td> -<td>AFBLIJVEN</td> -</tr> - -<tr> -<td><code>table_cache</code></td> -<td>AFBLIJVEN <em>(maximumwaarde = 64)</em></td> -</tr> - -<tr> -<td><code>table_open_cache</code></td> -<td>AFBLIJVEN</td> -</tr> - -<tr> -<td><code>join_buffer_size</code></td> -<td>Verhogen indien <code>Joins performed without indexes++</code></td> -</tr> - -<tr> -<td><code>tmp_table_size</code></td> -<td>Verhogen = <code>max_heap_table_size</code></td> -</tr> - -<tr> -<td><code>max_heap_table_size</code></td> -<td>Verhogen <code>= tmp_table_size</code></td> -</tr> - -<tr> -<td><code>query_cache_type</code></td> -<td><code>=1</code> indien <code>=0</code></td> -</tr> -</tbody> -</table> - -<blockquote> -<p>mysql tuning improvements -<code>table_cache</code> NOOIT hoger dan 64 -Sudo vim /etc/my.cnf -query_cache_size&rsquo; =&gt; &lsquo;256M’, -It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. -Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. -&lsquo;open_files_limit&rsquo; =&gt; &lsquo;4096&rsquo;, -Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. -&lsquo;join_buffer_size&rsquo; =&gt; &lsquo;256K’, -The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. -Minimumgrootte van buffer voor index en table scans.</p> -</blockquote> - -<hr /> - -<blockquote> -<p>&lsquo;max_heap_table_size&rsquo; =&gt; &lsquo;32M’, -This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. -Max grootte van user-created memory tables -These 2 need to be the same size!!! -&lsquo;tmp_table_size&rsquo; =&gt; &lsquo;32M’, -The maximum size of internal in-memory temporary tables. -Max grootte van interne in-memory tijdelijke tabellen</p> -</blockquote> - -<hr /> - -<blockquote> -<p>table_cache=64 (maximumwaarde!!) -Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&rsquo;ll keep opening and closing tables. -Maximumwaarde voor caching van geopende tabellen. -thread_cache_size=4 -How many threads the server should cache for reuse. -Aantal threads dat de server kan cachen voor hergebruik. -&lsquo;innodb_buffer_pool_size&rsquo; =&gt; &lsquo;1G&rsquo;, -The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.</p> -</blockquote> - -<p>Sudo service mysql/mariadb reload (restart enkel onder toezicht)</p> - -<ul> -<li><code>query_cache_*</code>:</li> -</ul> - -<blockquote> -<p><code>query_cache_type</code><br /> -Needs to be set to 1 to enable caching.<br /> -<code>query_cache_size</code><br /> -Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br /> -<code>query_cache_limit</code><br /> -Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br /> -Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br /> -<code>table_open_cache</code><br /> -Indicates the maximum number of tables the server keeps open</p> -</blockquote> - -<hr /> - -<p><code>innodb_buffer_pool_instances=2</code><br /> -<em>Enables the use of multiple threads for innodb.</em></p> - -<p><code>query_cache_type=1</code><br /> -<em>Enables query caching.</em></p> - -<p><code>join_buffer_size=1024K</code><br /> -<em>Increased the buffer size for non-indexed joins.</em></p> - -<p><code>tmp_table_size=64M &amp;&amp; max_heap_table_size=64M</code><br /> -<em>Increased the size for temporary tables.</em></p> - -<p><code>join_buffer_size</code><br /> -<em>Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.</em></p> - -<p><code>max_heap_table_size &amp; tmp_table_size</code><br /> -<em>De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.</em></p> - -<p><code>thread_cache_size</code><br /> -<em>Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.</em></p> - + https://blog.hagfi.sh/administration/letsencrypt/ + Let&rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@domain.tld --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen. +Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; order allow,deny allow from all satisfy any &lt;/Directory&gt; Of (2) voeg volgende regels toe aan . - Windows troubleshooting - https://hagfi.sh/administration/windows_troubleshooting/ + MySQL Tuner + https://blog.hagfi.sh/administration/mysql_tuner/ Sat, 25 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/windows_troubleshooting/ - - -<h2 id="windows-troubleshooting">Windows troubleshooting</h2> - -<p>VRAGEN: -+ openen vanuit ticketing, wachtwoord en gebruiker -+ custom even viewer view? -+ test server?</p> - -<h3 id="eventviewer"><em>EventViewer</em></h3> - -<p>run: eventvwr</p> - -<ul> -<li>custom views</li> -<li>windows - -<ul> -<li>application (non windows standard, puppet, vmware, mssql, &hellip;)</li> -<li>security, aan en afmelden</li> -<li>set-up: updates en installatie verwijderen programma&rsquo;s</li> -<li>system: OS meldingen</li> -</ul></li> -<li>application and services: diep graven -<br /> -<br /></li> -</ul> - -<p>&ndash;&gt; Filter Log:</p> - -<ul> -<li>logged (date range)<br /></li> -<li>event level<br /></li> -<li>event source<br /></li> -<li>event ID: 99,-1024,-4634<br /></li> -</ul> - -<p>rechtsonderaan &gt; event copy &gt; copy as text</p> - -<h3 id="powershell"><em>PowerShell</em></h3> - -<pre><code class="language-PowerShell">$first = -$last = -get-eventlog -Logname system - -</code></pre> - -<pre><code class="language-PowerShell"> `get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }` -</code></pre> - -<h3 id="task-viewer"><em>Task Viewer</em></h3> - -<ul> -<li>tasks</li> -<li>users</li> -<li>performance (indien gecrasht, bevestigen anders is het netwerk)</li> -</ul> - -<h3 id="resource-monitor"><em>Resource monitor</em></h3> - -<p>(task manager &gt; performance &gt; open resouce monitor)</p> - -<p>Overview &gt; CPU (ovenste tab) app aanvinken &ndash;&gt; filtert alles</p> - -<h3 id="netstat"><em>Netstat</em></h3> - -<p><code>netstat -abo &gt; C:\temp\log.txt</code></p> - -<h3 id="chocolate"><em>Chocolate</em></h3> - -<p>C:\ProgramData\chocolatey\bin\Procmon.exe -&ndash;&gt; selecteer lijn+kolom &gt; exclude &lsquo;name&rsquo; (=grep -v) / include &lsquo;name&rsquo; (=grep)</p> - -<h3 id="usefull-programs"><em>Usefull programs</em></h3> - -<ul> -<li>TreeView</li> -<li>VBluescreenviewer</li> -<li>Sysinternals</li> -<li>Zabbix</li> -<li>VMware events</li> -<li>BareTail</li> -<li>choco install</li> -<li>choco list -lo (view choco installed programs)</li> -<li>telnet 12.34.56.78 900</li> -<li>powershell: <code>stop service 'name'</code></li> -</ul> - -<h3 id="eventid-s"><em>EventID&rsquo;s</em></h3> - -<ul> -<li>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</li> -<li>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</li> -<li>Event ID 6008: &ldquo;The previous system shutdown was unexpected.&rdquo; Records that the system started after it was not shut down properly.</li> -<li>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</li> - -<li><p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. -Add to that a couple more from the Server Fault answers listed in my OP:</p></li> - -<li><p>Event ID 1074: &ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&rdquo; Indicates that an application or a user initiated a restart or shutdown.</p></li> - -<li><p>Event ID 1076: &ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p></li> -</ul> - -<h3 id="powershell-1"><em>PowerShell</em></h3> - -<pre><code class="language-PowerShell">$filter = &quot;*abbix*&quot; -get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter } -</code></pre> - + https://blog.hagfi.sh/administration/mysql_tuner/ + MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size' =&gt; &lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. - Dont Let Your Application Interfere With Letsencrypt - https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/ - Thu, 23 Aug 2018 22:46:41 +0200 + Windows troubleshooting + https://blog.hagfi.sh/administration/windows_troubleshooting/ + Sat, 25 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/ - - -<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> - + https://blog.hagfi.sh/administration/windows_troubleshooting/ + Windows troubleshooting VRAGEN: + openen vanuit ticketing, wachtwoord en gebruiker custom even viewer view? test server? EventViewer run: eventvwr + custom views windows application (non windows standard, puppet, vmware, mssql, &hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&rsquo;s system: OS meldingen application and services: diep graven &ndash;&gt; Filter Log: + logged (date range) event level event source event ID: 99,-1024,-4634 rechtsonderaan &gt; event copy &gt; copy as text Luks Encryption - https://hagfi.sh/administration/luks-encryption/ + https://blog.hagfi.sh/administration/luks-encryption/ Thu, 23 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/luks-encryption/ - - -<h2 id="add-a-new-disk-lvm">Add a new disk (LVM)</h2> - -<pre><code>root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done -root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1) -root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') -root@server:/dev/centos # echo ${NEWDISK} -sdd -root@server:/dev/centos # echo ${VGROUP} -centos -root@server:/dev/centos # pvcreate /dev/${NEWDISK} -Physical volume &quot;/dev/sdd&quot; successfully created. -root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} -Volume group &quot;centos&quot; successfully extended -</code></pre> - -<h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2> - -<pre><code>root@server:/dev/centos # lvcreate -L 15G -n encrypted centos -Logical volume &quot;encrypted&quot; created. -</code></pre> - -<h2 id="encrypt-the-partition">Encrypt the partition</h2> - -<pre><code>root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted -root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted -</code></pre> - -<h2 id="create-a-mountpoint">Create a mountpoint</h2> - -<pre><code>root@server:/dev/mapper # mkdir /encrypted -root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted -</code></pre> - -<h2 id="create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</h2> - -<pre><code>root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 -root@server:/dev/mapper # chmod 0400 /root/lukskey -</code></pre> - -<h2 id="unmount-and-add-the-key">Unmount and add the key</h2> - -<pre><code>root@server:/ # umount /encrypted -root@server:/ # cryptsetup luksClose luks-encrypted -root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey -</code></pre> - -<h2 id="get-uuid">Get UUID</h2> - -<pre><code>root@server:/ # blkid /dev/mapper/centos-encrypted -/dev/mapper/centos-encrypted: UUID=&quot;0dab9a5c-1870-478d-8d74-226eeb512f78&quot; TYPE=&quot;crypto_LUKS&quot; -</code></pre> - -<h2 id="auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</h2> - -<pre><code>luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks -</code></pre> - + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> - \ No newline at end of file + diff --git a/public/administration/letsencrypt/index.html b/public/administration/letsencrypt/index.html index 709edef..14404fe 100644 --- a/public/administration/letsencrypt/index.html +++ b/public/administration/letsencrypt/index.html @@ -13,14 +13,14 @@ - - + + - + @@ -32,7 +32,8 @@ - + + @@ -44,19 +45,31 @@ - - - + + + + + + - - - + @@ -65,28 +78,64 @@
- - + diff --git a/public/administration/luks-encryption/index.html b/public/administration/luks-encryption/index.html index 4e355ff..a7c3b67 100644 --- a/public/administration/luks-encryption/index.html +++ b/public/administration/luks-encryption/index.html @@ -14,13 +14,13 @@ - + - + @@ -32,7 +32,8 @@ - + + @@ -44,19 +45,31 @@ - - - + + + + + + - - - + @@ -65,28 +78,64 @@
- - + diff --git a/public/administration/mysql_tuner/index.html b/public/administration/mysql_tuner/index.html index 2c8345e..f756a6c 100644 --- a/public/administration/mysql_tuner/index.html +++ b/public/administration/mysql_tuner/index.html @@ -13,14 +13,14 @@ - - + + - + @@ -32,7 +32,8 @@ - + + @@ -44,19 +45,31 @@ - - - + + + + + + - - - + @@ -65,28 +78,64 @@
-
- + diff --git a/public/administration/toubles-with-interfaces-after-clone/index.html b/public/administration/toubles-with-interfaces-after-clone/index.html new file mode 100644 index 0000000..1667baf --- /dev/null +++ b/public/administration/toubles-with-interfaces-after-clone/index.html @@ -0,0 +1,354 @@ + + + + + Troubles with interfaces after a VM clone // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ Contents + +
+ + +
+

+ Troubles with interfaces after a VM clone +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + +

Remapping interfaces and their MAC address.

+

Often, when you clone a VM you could stumble against errors like:

+
[FAILED] Device eth0 does not seem to be present, delaying initialization
+

You could change your network configuration to match the correct interface or let Linux reread the available interfaces

+

/etc/udev/rules.d/70-persistent-net.rules holds the configuration of available devices. Make sure that the MAC address is correct and that the name maches your configuration

+ + + + +
+ Tags// + + , + + , + + , + + , + +
+ + + +
+ More Reading + +
+ Newer// + NCDU: NCurses Disk Usage +
+ + + + + +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/administration/windows_troubleshooting/index.html b/public/administration/windows_troubleshooting/index.html index 209e3db..fca3751 100644 --- a/public/administration/windows_troubleshooting/index.html +++ b/public/administration/windows_troubleshooting/index.html @@ -13,14 +13,14 @@ - - + + - + @@ -32,7 +32,8 @@ - + + @@ -44,19 +45,31 @@ - - - + + + + + + - - - + @@ -65,28 +78,64 @@
- - +
+ + +comments powered by Disqus - +
- + diff --git a/public/administration/yet-another-arch-guide/index.html b/public/administration/yet-another-arch-guide/index.html new file mode 100644 index 0000000..822448c --- /dev/null +++ b/public/administration/yet-another-arch-guide/index.html @@ -0,0 +1,478 @@ + + + + + Yet Another Arch Guide // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+

+ Yet Another Arch Guide +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + +

Setting up Arch with other bells and whistles.

+

Target

+

Lenovo X240 +i5-4300U +8GB DDR3 RAM +500GB SSD

+

Pre-requirements

+
    +
  • Bootable USB with Arch installer installed
  • +
  • Cabled connection
  • +
  • Device connected to a power supply
  • +
+

First things first

+

Keyboard layout

+
loadkeys [keyboard-identifier]
+

Check your internet connection

+
ping archlinux.org
+

Set timezone

+
timedatectl set-timezone Europe/Brussels
+

Prepairing your disks

+

Check which disks you have available

+
fdisk -l
+

Partitioning

+

Device your disk into individual partitions:

+
    +
  1. boot
  2. +
  3. arch
  4. +
  5. windows
  6. +
+

Some letters we gonna use

+
    +
  • p show your partition
  • +
  • n new partition
  • +
  • a set the bootflag
  • +
  • t set the type
  • +
  • L show available types
  • +
  • w write the changes
  • +
+

The actual work

+
fdisk [your-disk]
+

press n to create a new partition, the first prompt asks the type of partition, use p for Primary +Partition number, enter. +first sector, enter. +goto ‘Specify your sizes’.

+

Specify your sizes

+

+[SIZE][TGMK]

+

Set the bootflag

+

A partition needs a bootflag for the MBR know which partition use at startup

+

Set the types

+

Use t to set the type:

+

83 for boot (linux) +8e for arch (lvm) +7 for windows (HPFS/NTFS/exFAT)

+

LVM

+
pvcreate /dev/sda2
+vgcreate vg0 /dev/sda2
+lvcreate -L +2G -n swap vg0
+lvcreate -l 100%FREE -n swap vg0
+

Filesystems

+
mkswap /dev/mapper/vg0-swap
+mkfs.ext4 /dev/sda1
+mkfs.xfs /dev/mapper/vg0-root
+

Mount your disks and strap your seatbelt, we gonna pacstrap

+
mount /dev/mapper/vg0-root /mnt
+mkdir /mnt/boot
+mount /dev/sda1 /mnt/boot
+
pacstrap /mnt base base-devel vim bash-completion networkmanager
+

Make sure it boots!

+

genfstab -U /mnt » /mnt/etc/fstab

+

making it yours

+

arch-chroot /mnt

+

Time, Date, Region

+
ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime
+hwclock --systohc
+locale-gen
+

/etc/locale.conf

+
LANG=en_US.UTF-8 UTF-8
+

/etc/vconsole.conf

+
KEYMAP=be-latin1
+

/etc/hostname

+
myhostname
+

/etc/hosts

+
127.0.0.1   localhost
+::1     localhost
+127.0.0.1   myhostname.localdomain  myhostname
+
passwd
+

Grub

+
pacman -S grub
+grub-install /dev/sda
+grub-mkconfig > /boot/grub/grub.cfg
+

Ignore warnings

+

fstab

+

Add swap to fstab

+
/dev/mapper/vg0-swap swap swap default 0 0
+

Check your work by swapping the swap

+
swapoff -a
+mount -a
+swapon -a
+free
+

does your swap have bytes?

+

LVM can’t bot

+

Add the LVM module to the mkinitcpio config file at /etc/mkinitcpio.conf

+

add lvm2 to the HOOKS Array before filestystems

+
...
+HOOKS=(base udev autodetect modconf block lvm2 filestystems keyboard fsck)
+...
+
mkinitcpio -p linux
+

Cross fingers - reboot

+

Enable services

+
systemctl enable NetworkManager
+systemctl start NetworkManager
+
+ + + + +
+ Tags// + + , + +
+ + + +
+ More Reading + +
+ Newer// + Bash Tips & Tricks +
+ + + +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/categories/administration/index.html b/public/categories/administration/index.html new file mode 100644 index 0000000..44dc1c9 --- /dev/null +++ b/public/categories/administration/index.html @@ -0,0 +1,551 @@ + + + + + administration // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Yet Another Arch Guide +

+
+
+ + + + +
+ +

+ +
+

Setting up Arch with other bells and whistles.

+
+ + +
+ +
+
+ +

+ Bash Tips & Tricks +

+
+
+ + + + + + +
+ +

+ +
+

Usefull bash tips & tricks

+
+ + +
+ +
+
+ +

+ Changing boot targets +

+
+
+ + + + +
+ +

+ +
+

Switch between run levels / environments.

+
+ + +
+ +
+
+ +

+ Mount with automount (autofs) +

+
+
+ + + + +
+ +

+ +
+

Automagically mount remote directories on login.

+
+ + +
+ +
+
+ +

+ Fatrace: Report system wide file access events +

+
+
+ + + + + + +
+ +

+ +
+

fatrace watches every file on server (except from itself and other kernel file systems).

+
+ + +
+ +
+
+ +

+ Troubles with interfaces after a VM clone +

+
+
+ + + + +
+ +

+ +
+

Remapping interfaces and their MAC address.

+
+ + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+
+ +

+ Luks Encryption +

+
+
+ + + + +
+ +

+ +
+

Create an encrypted partition that will automatically mount at boot.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/categories/administration/index.xml b/public/categories/administration/index.xml new file mode 100644 index 0000000..94e70d2 --- /dev/null +++ b/public/categories/administration/index.xml @@ -0,0 +1,83 @@ + + + + administration on Hagfi.sh + https://blog.hagfi.sh/categories/administration/ + Recent content in administration on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 30 Nov 2018 10:08:22 +0200 + + Yet Another Arch Guide + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + Fri, 30 Nov 2018 10:08:22 +0200 + + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + <p>Setting up Arch with other bells and whistles.</p> + + + + Bash Tips & Tricks + https://blog.hagfi.sh/administration/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/administration/bash/ + <p>Usefull bash tips &amp; tricks</p> + + + + Changing boot targets + https://blog.hagfi.sh/administration/boot-targets/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/boot-targets/ + <p>Switch between run levels / environments.</p> + + + + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + Luks Encryption + https://blog.hagfi.sh/administration/luks-encryption/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> + + + + diff --git a/public/categories/development/index.html b/public/categories/development/index.html new file mode 100644 index 0000000..7b0850f --- /dev/null +++ b/public/categories/development/index.html @@ -0,0 +1,320 @@ + + + + + development // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Bash Tips & Tricks +

+
+
+ + + + + + +
+ +

+ +
+

Usefull bash tips & tricks

+
+ + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/categories/development/index.xml b/public/categories/development/index.xml new file mode 100644 index 0000000..84ec59f --- /dev/null +++ b/public/categories/development/index.xml @@ -0,0 +1,30 @@ + + + + development on Hagfi.sh + https://blog.hagfi.sh/categories/development/ + Recent content in development on Hagfi.sh + Hugo -- gohugo.io + en-us + Sun, 11 Nov 2018 16:01:15 +0100 + + Bash Tips & Tricks + https://blog.hagfi.sh/administration/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/administration/bash/ + <p>Usefull bash tips &amp; tricks</p> + + + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/categories/index.html b/public/categories/index.html new file mode 100644 index 0000000..f6954b9 --- /dev/null +++ b/public/categories/index.html @@ -0,0 +1,319 @@ + + + + + Categories // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ administration +

+
+ + + + +
+ +
+
+ +

+ development +

+
+ + + + +
+ +
+
+ +

+ tools +

+
+ + + + +
+ +
+ + +
+
+ + + diff --git a/public/categories/index.xml b/public/categories/index.xml new file mode 100644 index 0000000..31e94c6 --- /dev/null +++ b/public/categories/index.xml @@ -0,0 +1,38 @@ + + + + Categories on Hagfi.sh + https://blog.hagfi.sh/categories/ + Recent content in Categories on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 30 Nov 2018 10:08:22 +0200 + + administration + https://blog.hagfi.sh/categories/administration/ + Fri, 30 Nov 2018 10:08:22 +0200 + + https://blog.hagfi.sh/categories/administration/ + + + + + development + https://blog.hagfi.sh/categories/development/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/categories/development/ + + + + + tools + https://blog.hagfi.sh/categories/tools/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/categories/tools/ + + + + + diff --git a/public/categories/tools/index.html b/public/categories/tools/index.html new file mode 100644 index 0000000..ca16e71 --- /dev/null +++ b/public/categories/tools/index.html @@ -0,0 +1,321 @@ + + + + + tools // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Fatrace: Report system wide file access events +

+
+
+ + + + + + +
+ +

+ +
+

fatrace watches every file on server (except from itself and other kernel file systems).

+
+ + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/categories/tools/index.xml b/public/categories/tools/index.xml new file mode 100644 index 0000000..3daa509 --- /dev/null +++ b/public/categories/tools/index.xml @@ -0,0 +1,29 @@ + + + + tools on Hagfi.sh + https://blog.hagfi.sh/categories/tools/ + Recent content in tools on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/css/prism.css b/public/css/prism.css new file mode 100644 index 0000000..f5e62c1 --- /dev/null +++ b/public/css/prism.css @@ -0,0 +1,259 @@ +/* PrismJS 1.15.0 +https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript+markup-templating+php+puppet+pug+yaml&plugins=line-numbers+toolbar+show-language */ +/** + * okaidia theme for JavaScript, CSS and HTML + * Loosely based on Monokai textmate theme by http://www.monokai.nl/ + * @author ocodia + */ + +code[class*="language-"], +pre[class*="language-"] { + color: #f8f8f2; + background: none; + text-shadow: 0 1px rgba(0, 0, 0, 0.3); + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + word-wrap: normal; + line-height: 1.5; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; +} + +/* Code blocks */ +pre[class*="language-"] { + padding: 1em; + margin: 0; + overflow: auto; + border-radius: 0.3em; +} + +:not(pre) > code[class*="language-"], +pre[class*="language-"] { + background: #2E303A; +} + +/* Inline code */ +:not(pre) > code[class*="language-"] { + padding: .1em; + border-radius: .3em; + white-space: normal; +} + +.token.comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: slategray; +} + +.token.punctuation { + color: #f8f8f2; +} + +.namespace { + opacity: .7; +} + +.token.property, +.token.tag, +.token.constant, +.token.symbol, +.token.deleted { + color: #f92672; +} + +.token.boolean, +.token.number { + color: #ae81ff; +} + +.token.selector, +.token.attr-name, +.token.string, +.token.char, +.token.builtin, +.token.inserted { + color: #a6e22e; +} + +.token.operator, +.token.entity, +.token.url, +.language-css .token.string, +.style .token.string, +.token.variable { + color: #f8f8f2; +} + +.token.atrule, +.token.attr-value, +.token.function, +.token.class-name { + color: #e6db74; +} + +.token.keyword { + color: #66d9ef; +} + +.token.regex, +.token.important { + color: #fd971f; +} + +.token.important, +.token.bold { + font-weight: bold; +} +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +pre[class*="language-"].line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; +} + +pre[class*="language-"].line-numbers > code { + position: relative; + white-space: inherit; +} + +.line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + +} + + .line-numbers-rows > span { + pointer-events: none; + display: block; + counter-increment: linenumber; + } + + .line-numbers-rows > span:before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: 0.8em; + text-align: right; + } + +div.code-toolbar { + border-radius: 0.3em; + overflow: hidden; + position: relative; +} + +div.code-toolbar > .toolbar { + position: absolute; + top: 5px; + right: -2px; + transition: opacity 0.1s ease-in-out; + opacity: 0; +} + +div.code-toolbar:hover > .toolbar { + opacity: 1; +} + +div.code-toolbar > .toolbar .toolbar-item { + display: inline-block; +} + +div.code-toolbar > .toolbar a { + cursor: pointer; +} + +div.code-toolbar > .toolbar button { + background: none; + border: 0; + color: inherit; + font: inherit; + line-height: normal; + overflow: visible; + padding: 0; + -webkit-user-select: none; /* for button */ + -moz-user-select: none; + -ms-user-select: none; +} + +div.code-toolbar > .toolbar a, +div.code-toolbar > .toolbar button, +div.code-toolbar > .toolbar span { + color: #FFF; + font-size: .8em; + padding: 0 .5em; + background: #64C2A0; + padding: 1em; + border-top-right-radius: 0.4em; + border-bottom-left-radius: 0.5em; +} + +div.code-toolbar > .toolbar a:hover, +div.code-toolbar > .toolbar a:focus, +div.code-toolbar > .toolbar button:hover, +div.code-toolbar > .toolbar button:focus, +div.code-toolbar > .toolbar span:hover, +div.code-toolbar > .toolbar span:focus { + text-decoration: none; +} + +.command-line-prompt { + border-right: 1px solid #999; + display: block; + float: left; + font-size: 100%; + letter-spacing: -1px; + margin-right: 1em; + pointer-events: none; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.command-line-prompt > span:before { + color: #999; + content: ' '; + display: block; + padding-right: 0.8em; +} + +.command-line-prompt > span[data-user]:before { + content: "[" attr(data-user) "@" attr(data-host) "] $"; +} + +.command-line-prompt > span[data-user="root"]:before { + content: "[" attr(data-user) "@" attr(data-host) "] #"; +} + +.command-line-prompt > span[data-prompt]:before { + content: attr(data-prompt); +} \ No newline at end of file diff --git a/public/css/redlounge.css b/public/css/redlounge.css index 266b7c6..9d863cd 100644 --- a/public/css/redlounge.css +++ b/public/css/redlounge.css @@ -6,9 +6,12 @@ html { color: #2d303b; } -html, p, nav, section, article { +html, p, nav, section, article, div { font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; } +*:focus { + outline: 0; +} pre { padding: 0; } @@ -24,7 +27,7 @@ a { color: #616161; } a:hover { - color:#E54028; + color:#35c49e; } a:hover, a:focus { @@ -38,7 +41,7 @@ a.pure-button-primary:hover, a.pure-button-primary:focus { color: #fff; } p a { - color:#7F1000; + color:#35c49e; } h1 { font-family: 'Libre Baskerville', serif; @@ -48,10 +51,10 @@ h1 { text-align: center; } .red { - color: #E54028; + color: #35c49e; } .dark-red { - color: #7F1000; + color: #35c49e; } .thin-line { height: 1px; @@ -105,7 +108,7 @@ h2.brand-tagline { color: #fff; } .sidebar a:hover { - color:#E54028; + color:#35c49e; } /* Nav */ @@ -118,7 +121,6 @@ h2.brand-tagline { .nav-item { display: inline-block; *display: inline; - zoom: 1; } .nav-item a { background: transparent; @@ -136,9 +138,9 @@ h2.brand-tagline { text-decoration: none; } .nav-item-separator { - font-weight: 100; + font-weight: 300; font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; - color: #E54028; + color: #35c49e; letter-spacing: -0.35rem; margin-right: 0.4rem; } @@ -160,7 +162,7 @@ h1.post-title a { color: #111111; } .post-date { - color: #E54028; + color: #35c49e; font-family: 'Libre Baskerville', serif; font-weight: 400; font-size: 1.0rem; @@ -171,18 +173,18 @@ h1.post-title a { } .post-date-separator { font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; - font-weight: 100; + font-weight: 300; letter-spacing: -0.35rem; font-size: 1.9rem; - color: #7F1000; + color: #35c49e; } .post-date-month { font-size: 0.8rem; - color: #7F1000; + color: #35c49e; } .post-date-year { font-size: 0.8rem; - color: #7F1000; + color: #35c49e; } a.post-author { font-size: 0.9rem; @@ -195,7 +197,7 @@ a.post-author { color: #bbb; } .post-author-social a:hover, .post-author-social a:focus { - color: #E54028; + color: #35c49e; } .post-author-social i { font-size: 0.9rem; @@ -211,7 +213,7 @@ a.post-author { .post h3 { margin-bottom: .25rem; font-size: 1.4rem; - color: #7F1000; + color: #35c49e; font-weight: 500; } .post h3.post-subtitle { @@ -263,15 +265,15 @@ a.post-author { /*text-transform: uppercase;*/ font-weight: 400; font-size: 0.9rem; - color: #7F1000; + color: #35c49e; } .read-more-link a:hover, .read-more-link a:focus { - color: #E54028; + color: #35c49e; } .read-more-slashes { font-weight: 100; font-family: 'Raleway', 'Helvetica', 'Arial', sans-serif; - color: #E54028; + color: #35c49e; letter-spacing: -0.26rem; margin-right: 0.3rem; } @@ -292,7 +294,7 @@ p.post-meta { color: #616161; } .post-meta a:hover { - color: #E54028; + color: #35c49e; } .post-categories { clear: left; @@ -369,7 +371,7 @@ a.post-category:hover { /* Decorative Marker */ .decorative-marker { - color: #E54028; + color: #35c49e; letter-spacing: -0.25rem; margin-right: 0.4rem; margin-lefT: 0.1rem; @@ -424,7 +426,7 @@ nav#TableOfContents ul:first-child { text-decoration: none; } .footer a:hover { - color:#E54028; + color:#35c49e; text-decoration: underline; } .footer .pure-menu a:hover, @@ -451,7 +453,161 @@ hr.thin { width: 90%; } +.search { + padding: 0.5em; + border: 0; + border-radius: 0.2em; + width: 100%; +} + +.result-items { + padding: 0; +} + +.result-items .post-date-day, +.result-items .post-date-separator, +.result-items .post-date-month, +.result-items .post-date-year { + color: white; +} +.result-item-left { + text-align: left; +} +.result-item-right { + text-align: right; +} + +.result-item { + list-style-type: none; + text-align: right; + padding: 0.6em 0; + /*border-bottom: 1px solid #8B8B8B;*/ +} + +.result-item a { + text-decoration: none; +} + +.result-item:last-child { + border-bottom: none; +} + +.menu-item-depth-3 ul li.last a { + border-bottom: none; +} + + +.result-item > a { + text-decoration: none; +} + +.result-item-separator, +.result-item-link { + transition: all .1s ease-out; +} + +.result-point { + position: absolute; + left: -50px; + transition: all .2s ease-out; +} + +.result-item-selected .result-item-link { + color: #35c49e; +} + +hr { + color: #35c49e; + background-color: #35c49e; + height: 1px; +} + +table { + border-collapse: collapse; + width: 100%; +} +table td, table th { + border: 0.1em solid #35c49e; + padding: 0.5em; +} +table tr:first-child th { + border-top: 0; +} +table tr:last-child td { + border-bottom: 0; +} +table tr td:first-child, +table tr th:first-child { + border-left: 0; +} +table tr td:last-child, +table tr th:last-child { + border-right: 0; +} + +.counters { + display: flex; + flex-wrap: wrap; + margin-bottom: 2em; +} + +.counters .counter { + text-decoration: none; + display: flex; + flex-direction: column; + flex: 33%; + text-align: center; + font-size: 4vw; + color: #FFF; +} + +.counters .counter .counter-sub { + text-align: center; + font-size: 1.2vw; +} + +h1 > a { + text-decoration: none; + +} + +h1 > a:hover { + text-decoration: none; +} + @media (max-width: 1024px) { + .search-wrapper { + margin: 0 0em; + } + +/* .counters { + display: flex; + flex-direction: row; + margin-bottom: 2em; + } + + .counters .counter { + text-align: center; + text-decoration: none; + display: flex; + flex-direction: row; + flex: 33%; + font-size: 3vw; + color: #FFF; + } + + .counters .counter .counter-sub { + text-align: center; + display: flex; + justify-content: left; + font-size: 3vw; + }*/ + + .result-item { + list-style-type: none; + text-align: right; + padding: 0.2em 0; + } h1.brand-title { font-size: 2.5rem; } @@ -468,7 +624,29 @@ hr.thin { } } +@media (max-width: 764px) { + .search-wrapper { + margin: 0 2em; + } + + .counters .counter { + text-decoration: none; + display: flex; + flex-direction: column; + flex: 33%; + text-align: center; + font-size: 8vw; + color: #FFF; + } + + .counters .counter .counter-sub { + text-align: center; + font-size: 4vw; + } +} + @media (min-width: 48rem) { + .content { padding: 2rem 3rem 0; margin-left: 25%; diff --git a/public/development/index.html b/public/development/index.html index f2da85f..6edbad1 100644 --- a/public/development/index.html +++ b/public/development/index.html @@ -14,13 +14,13 @@ - + - + @@ -32,7 +32,8 @@ - + + @@ -42,49 +43,97 @@ - + - - - + + + + + + - - - +
-
- + diff --git a/public/development/index.xml b/public/development/index.xml index e0dca8f..479eeec 100644 --- a/public/development/index.xml +++ b/public/development/index.xml @@ -1,25 +1,21 @@ - + Developments on Hagfi.sh - https://hagfi.sh/development/index.xml + https://blog.hagfi.sh/development/ Recent content in Developments on Hagfi.sh Hugo -- gohugo.io en-us - Thu, 23 Aug 2018 22:44:46 +0200 - - + Wed, 29 Aug 2018 22:44:46 +0200 - Vue Js - https://hagfi.sh/development/vue-js/ - Thu, 23 Aug 2018 22:44:46 +0200 + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 - https://hagfi.sh/development/vue-js/ - - -<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> - + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> - \ No newline at end of file + diff --git a/public/development/live-search-with-hugo/index.html b/public/development/live-search-with-hugo/index.html new file mode 100644 index 0000000..cc0351b --- /dev/null +++ b/public/development/live-search-with-hugo/index.html @@ -0,0 +1,564 @@ + + + + + Live Search With HUGO // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+

+ Live Search With HUGO +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + +
+ + + + + + +

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+

Research

+

Some this I found which helped to get there are:

+ +

Create a JSON object containing all articles

+

Actually every data you want to search, in this guide (and on this website) I use the following data:

+
    +
  1. Title
  2. +
  3. Date
  4. +
  5. Author
  6. +
  7. Tags
  8. +
  9. Content
  10. +
+

This is specified in a custom layout. Note the (dict "title" ...) line. You can add any data that HUGO processes (for each article). Its a list of key/values, the keys are presented between the quotes, the value as first value.

+

layouts/json/single.html

+
{{- $.Scratch.Add "index" slice -}}
+{{- range where .Site.Pages "Type" "not in"  (slice "page" "json") -}}
+{{- $.Scratch.Add "index" (dict "title" .Title "date" .Date "author" .Params.author "href" .Permalink "tags" .Params.tags "content" .Plain) -}}
+{{- end -}}
+{{- $.Scratch.Get "index" | jsonify -}}
+

Now, with this file in place the next thing to do is to create a content page, where this layout is used. This file triggers the creation of “index.json”.

+

content/search.md

+
---
+date: "2017-03-05T21:10:52+01:00"
+type: "json"
+url: "index.json"
+---
+

Example of the data returned +You can checkout the json object for this website, just go to https://hagfi.sh/index.json

+
[
+  {
+    "author": "Kristof Vandam",
+    "content": "HUGO is static, that\u0026rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions that require a page refresh, this time of age performance is key, so that\u0026rsquo;s why I wanted a fast and fuzzy search implementation. Research Some this I found which helped to get there are:\n https://gohugo.io/tools/search/ ",
+    "date": "2018-08-29T22:44:46+02:00",
+    "href": "http://localhost:1313/development/live-search-with-hugo/",
+    "tags": null,
+    "title": "Live Search With HUGO"
+  }
+]
+

Add the required dependencies (we use CDN’s)

+

Make sure the following dependencies are loaded between the head tags. We use a little trick to let the browser decide if http or https is used. These are called Protocol-Relative URL’s.

+
<script src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js"></script>
+<script src="//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js"></script>
+<script src="//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js"></script>
+<script src="//cdn.bootcss.com/fuse.js/3.2.0/fuse.min.js"></script>
+

Add the actual search logic

+

It’s a best practice to add the JavaScript right before the closing body tags. I highly suggest checking out VueJS with Webpack, but in this case a some simple JS inside script tags will do just fine.

+

I will go over each section to clarify.

+
var app = new Vue({
+  el: '#app',
+  data: {
+    fuse: null,
+    search: "",
+    result: [],
+    index: []
+  },
+  mounted() {
+
+    let self = this
+
+    let options = {
+      shouldSort: true,
+      threshold: 0.6,
+      location: 0,
+      distance: 100,
+      maxPatternLength: 32,
+      minMatchCharLength: 1,
+      keys: [
+        "title",
+        "author",
+        "date",
+        "content"
+      ]
+    }
+    axios.get('/index.json')
+    .then(function (response) {
+      self.index = response.data
+      self.fuse = new Fuse(response.data, options);
+      self.result = fuse.search("");
+    })
+    .catch(function (error) {
+      console.log(error)
+    })
+  },
+  watch: {
+    search(nval, oval) {
+      if (nval.length > 0) {
+        this.result = this.fuse.search(nval)
+      } else {
+        this.result = []
+      }
+    }
+  }
+})
+

Create the Vue instance

+

When creating a new Vue instance we assign Vue to a DOM element, most of the time an ID on your body tag is used.

+
var app = new Vue({
+  el: '#app',
+  ...
+})
+

Create a data object

+

This object is accesible across your DOM and Vue instance. Inside functions you can reffer to these with this.*.language-
+I initiated some variables like ‘fuse’ so it can be used inside watch and methods.

+
data: {
+  fuse: null,
+  search: "",
+  result: [],
+  index: []
+},
+

What todo when everything is ready

+

The mounted() function is triggered when everything ready to start processing your custom code. (This function used to name ‘ready()').
+We assign this to self to handle some scope issues in the axios promise.
+We polulate some options for FuseJS, note that the keys array is important here. Here we specify which keys of our index.json we want to search.
+The index.json file is loaded with AJAX, this way the page should not wait for content that is not required immediately.
+When axios retrieves the date we create a Fuse instance (assigned to self.fuse (or this.fuse)).

+
mounted() {
+
+  let self = this
+
+  let options = {
+    shouldSort: true,
+    threshold: 0.6,
+    location: 0,
+    distance: 100,
+    maxPatternLength: 32,
+    minMatchCharLength: 1,
+    keys: [
+      "title",
+      "author",
+      "date",
+      "content"
+    ]
+  }
+  axios.get('/index.json')
+  .then(function (response) {
+    self.index = response.data
+    self.fuse = new Fuse(response.data, options);
+    self.result = fuse.search("");
+  })
+  .catch(function (error) {
+    console.log(error)
+  })
+},
+

When something is entered inside the search field

+

We watch for this.search to change, if it changes this function is called. Remember we set search: "" inside our data object? +If the ‘nval’ (New VALue) is larger than 0 characters we trigger the search function of fuse, which will return a new data set, but filtered. +This dataset is stored inside this.result.language-

+

If the length of ‘nval’ changes to 0 characters we hardcode the result to be an empty array (to prevent possible edgecases).

+
watch: {
+  search(nval, oval) {
+    if (nval.length > 0) {
+      this.result = this.fuse.search(nval)
+    } else {
+      this.result = []
+    }
+  }
+}
+

Ok, cool, now how do I showcase the results?

+

Well, it’s up to you. The most important parts in this example are:

+
    +
  1. Bind this.search to the input field (with v-model)
  2. +
  3. Loop through this.result with v-for, it will recreate the li tag ‘for each’ result item.
  4. +
  5. Use the result item, reffered as r.
  6. +
  7. Links are extracted from the result item by the ‘href’ key and bound to the href attribute. :href="r.href"
  8. +
+

We use Moment.js to format the default (can be changed) HUGO date format to ‘D’ (Day), ‘MMM’ (Month, max 3 characters), ‘YYYY’ (Full Year).

+
<div class="search-wrapper">
+  <input type="text" placeholder="Search ..." v-model="search" class="search"/>
+  <ul class="result-items">
+    <li v-for="r of result" class="result-item">
+      <div class="result-item-wrapper">
+        <div class="result-item-left">
+          <span class="post-date">
+            <span class="post-date-day"><sup v-text="moment(r.date).format('D')"></sup></span><span class="post-date-separator">/</span><span class="post-date-month" v-text="moment(r.date).format('MMM')"></span> <span class="post-date-year" v-text="moment(r.date).format('YYYY')"></span>
+          </span>
+            <template v-if="r.author">By <a class="post-author" v-text="r.author"></a></template>
+        </div>
+        <div class="result-item-left">
+          <span class="nav-item-separator">//</span><a :href="r.href" v-text="r.title"></a>
+        </div>
+      </div>
+    </li>
+  </ul>
+</div>
+
+ + + + +
+ Tags// + + , + + , + + , + + , + + , + + , + + , + + , + +
+ + + +
+ More Reading + +
+ Newer// + Let's Encrypt +
+ + + +
+ Older// + NCDU: NCurses Disk Usage +
+ +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/index.html b/public/index.html index cdfb6fd..5af8cf0 100644 --- a/public/index.html +++ b/public/index.html @@ -14,13 +14,13 @@ - + - + @@ -32,7 +32,8 @@ - + + @@ -42,49 +43,97 @@ - + - - - + + + + + + - - - +
-
+ diff --git a/public/index.json b/public/index.json new file mode 100644 index 0000000..0f53c86 --- /dev/null +++ b/public/index.json @@ -0,0 +1 @@ +[{"author":"Kristof Vandam - Adam Verbeeck","content":"Setting up Arch with other bells and whistles.\nTarget Lenovo X240 i5-4300U 8GB DDR3 RAM 500GB SSD\nPre-requirements Bootable USB with Arch installer installed Cabled connection Device connected to a power supply First things first Keyboard layout loadkeys [keyboard-identifier] Check your internet connection ping archlinux.org Set timezone timedatectl set-timezone Europe/Brussels Prepairing your disks Check which disks you have available fdisk -l Partitioning Device your disk into individual partitions:\n boot arch windows Some letters we gonna use p show your partition n new partition a set the bootflag t set the type L show available types w write the changes The actual work fdisk [your-disk] press n to create a new partition, the first prompt asks the type of partition, use p for Primary Partition number, enter. first sector, enter. goto \u0026lsquo;Specify your sizes\u0026rsquo;.\nSpecify your sizes +[SIZE][TGMK]\nSet the bootflag A partition needs a bootflag for the MBR know which partition use at startup\nSet the types Use t to set the type:\n83 for boot (linux) 8e for arch (lvm) 7 for windows (HPFS/NTFS/exFAT)\nLVM pvcreate /dev/sda2 vgcreate vg0 /dev/sda2 lvcreate -L +2G -n swap vg0 lvcreate -l 100%FREE -n swap vg0 Filesystems mkswap /dev/mapper/vg0-swap mkfs.ext4 /dev/sda1 mkfs.xfs /dev/mapper/vg0-root Mount your disks and strap your seatbelt, we gonna pacstrap mount /dev/mapper/vg0-root /mnt mkdir /mnt/boot mount /dev/sda1 /mnt/boot pacstrap /mnt base base-devel vim bash-completion networkmanager Make sure it boots! genfstab -U /mnt \u0026raquo; /mnt/etc/fstab\nmaking it yours arch-chroot /mnt\nTime, Date, Region ln -sf /usr/share/zoneinfo/Europe/Brussels /etc/localtime hwclock --systohc locale-gen /etc/locale.conf\nLANG=en_US.UTF-8 UTF-8 /etc/vconsole.conf\nKEYMAP=be-latin1 /etc/hostname\nmyhostname /etc/hosts\n127.0.0.1 localhost ::1 localhost 127.0.0.1 myhostname.localdomain myhostname passwd Grub pacman -S grub grub-install /dev/sda grub-mkconfig \u0026gt; /boot/grub/grub.cfg Ignore warnings\nfstab Add swap to fstab\n/dev/mapper/vg0-swap swap swap default 0 0 Check your work by swapping the swap\nswapoff -a mount -a swapon -a free does your swap have bytes?\nLVM can\u0026rsquo;t bot Add the LVM module to the mkinitcpio config file at /etc/mkinitcpio.conf\nadd lvm2 to the HOOKS Array before filestystems\n... HOOKS=(base udev autodetect modconf block lvm2 filestystems keyboard fsck) ... mkinitcpio -p linux Cross fingers - reboot Enable services systemctl enable NetworkManager systemctl start NetworkManager ","date":"2018-11-30T10:08:22+02:00","href":"https://blog.hagfi.sh/administration/yet-another-arch-guide/","tags":["arch"],"title":"Yet Another Arch Guide"},{"author":"Olivier De Ram","content":"Usefull bash tips \u0026amp; tricks\nUsefull CLI shortcuts: Shortcut Description Ctrl+a Jump to the beginning of the command line. Ctrl+e Jump to the end of the command line. Ctrl+u Clear from the cursor to the beginning of the command line. Ctrl+k Clear from the cursor to the end of the command line. Ctrl+Left Arrow Jump to the beginning of the previous word on the command line. Ctrl+Right Arrow Jump to the end of the next word on the command line. Ctrl+r Search the history list of commands for a pattern. Esc + . Copy the last word of the previous command on the current command line where the cursor is Redirect output: Command result \u0026gt; file redirect stdout to overwrite a file \u0026gt;\u0026gt; file redirect stdout to append to a file 2\u0026gt; file redirect stderr to overwrite a file 2\u0026gt; /dev/null discard stderr error messages by redirecting to /dev/null \u0026amp;\u0026gt; file (OR \u0026gt; file 2\u0026gt;\u0026amp;1) redirect stdout and stderr to overwrite the same file \u0026amp;\u0026gt;\u0026gt; (OR \u0026gt;\u0026gt; file 2\u0026gt;\u0026amp;1) redirect stdout and stderr to append to the same file Create a function: It\u0026rsquo;s straightforward, use function to create a function, give it a usefull short name and put the statemants between curly brackets.\nUse $1 for the first argument, $2 for the second argument and so on\u0026hellip;\nfunction \u0026lt;name\u0026gt; { \u0026lt;bashcommands\u0026gt; } For example the function logsearch which searches for the given string whitin all logfiles in the current directory:\nfunction logsearch { zgrep $1 ./*log } Short scripts: Loop every file in path: for F in /path/to/files/*; do echo \u0026#34;Files $F\u0026#34;; done Loop file line per line: while read LINE; do echo $LINE; done \u0026lt; file.txt ","date":"2018-11-11T16:01:15+01:00","href":"https://blog.hagfi.sh/administration/bash/","tags":["bash","script"],"title":"Bash Tips \u0026 Tricks"},{"author":"Kristof Vandam","content":"Switch between run levels / environments.\nChanging boot targets On the fly Goto a graphical environment\nsystemctl isolate graphical.target Goto a text based environment\nsystemctl isolate multi-user.target Permanently change environments Graphical environment\nsystemctl set-default graphical.target Text based environment\nsystemctl set-default multi-user.target Set target on boot Interrupt the bootloader (GRUB) and edit the kernel entry before booting. Press e to edit the entry Goto the line that starts with linux16 suffix the line with your desired target as followed: systemd.unit=rescue.target ","date":"2018-11-09T10:08:15+02:00","href":"https://blog.hagfi.sh/administration/boot-targets/","tags":["linux","security","boot"],"title":"Changing boot targets"},{"author":"Kristof Vandam","content":"Automagically mount remote directories on login.\nInstall the required pakages sudo yum -y install autofs Create the entry file the mapper file is a file where we specify the directory where all our mounts should be placed.\nThis file should be stored in /etc/auto.master.d, note that the extension is required to be .autofs\nfor example: /etc/auto.master.d/home.autofs\n/home/guests /etc/auto.home The value for /home/guests is the file where we specify our mount options.\nNote: Make sure the /home/guests directory exists, if not create it with:\nmkdir /home/guests Create the mapper file We earlier specified where our map file should be stored (/etc/auto.home), create this file.\nSay we want to auto mount the home directories stored on serverA on /home/guests/[USER] when [USER] logs in.\n* -rw,sync serverA:/home/guests/\u0026amp; The wildcards task is to create the directory based on the users homedirectory on serverA (specified with \u0026amp;) We give option like: read/write and sync As last param we have to say where we want to mount to, again, the \u0026amp; is dynamic and maps to the logged in user. Enable and start the service sudo systemctl enable autofs sudo systemctl start autofs Wrapping up Log in as a user, and check if the mount is present as expected.\ndf -h Should output something like:\nFilesystem Size Used Avail Use% Mounted on /dev/xvda1 8.0G 5.6G 2.5G 70% / devtmpfs 224M 0 224M 0% /dev tmpfs 244M 0 244M 0% /dev/shm tmpfs 244M 41M 204M 17% /run tmpfs 244M 0 244M 0% /sys/fs/cgroup tmpfs 49M 0 49M 0% /run/user/1000 tmpfs 49M 0 49M 0% /run/user/0 /serverA:/home/guests/user1 200M 0 200M 0% /home/guests/user1 Note the last line where we see that the mount is present\n","date":"2018-11-09T10:08:15+02:00","href":"https://blog.hagfi.sh/administration/autofs/","tags":["linux","data","mount","shares"],"title":"Mount with automount (autofs)"},{"author":"Kristof Vandam","content":"fatrace watches every file on server (except from itself and other kernel file systems).\nfatrace watches every file on server (except from itself and other kernel file systems).\nInstall on Centos7 Download the repo file from fedorainfracloud.org\nsudo curl https://copr.fedorainfracloud.org/coprs/ifas/fatrace/repo/epel-7/ifas-fatrace-epel-7.repo \u0026gt; /etc/yum.repos.d/ifas.repo sudo yum install fatrace -y Usage Option Description -c, \u0026ndash;current-mount Only record events on partition/mount of current directory. Without this option, all (real) partitions/mount points are being watched. -o FILE, \u0026ndash;output=FILE Write events to given file instead of standard output. -s SECONDS, \u0026ndash;seconds=SECONDS Stop after the given number of seconds. -t, \u0026ndash;timestamp Add timestamp to events. When this option is given once, the format will be a humanreadable -p PID, \u0026ndash;ignore-pid=PID Ignore events for this process ID. Can be specified multiple times. Output The output should look something like the following. My action was reloading this page while watching with fatrace.\n$ fatrace -t 12:58:20.859174 pickup(7666): CO /var/spool/postfix/maildrop 12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace 12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace/index.html 12:58:21.017572 caddy(7472): W /var/log/caddy/blog.log 12:58:21.213908 caddy(7472): CO /var/www/vhosts/blog/index.json 12:58:21.213908 caddy(7472): W /var/log/caddy/blog.log 12:58:21.305848 caddy(7472): RCO /var/www/vhosts/blog/img/favicon.png 12:58:21.305848 caddy(7472): W /var/log/caddy/blog.log Letter Description R Read W Write O Open C Close Action identifiers can be combined\nUsecases identifying which files are accessed by a process.\nReferences Manpage fatrace\n","date":"2018-11-05T22:13:49+02:00","href":"https://blog.hagfi.sh/tools/fatrace/","tags":["directory","size","inventory"],"title":"Fatrace: Report system wide file access events"},{"author":"Kristof Vandam","content":"Remapping interfaces and their MAC address.\nOften, when you clone a VM you could stumble against errors like:\n[FAILED] Device eth0 does not seem to be present, delaying initialization You could change your network configuration to match the correct interface or let Linux reread the available interfaces\n/etc/udev/rules.d/70-persistent-net.rules holds the configuration of available devices. Make sure that the MAC address is correct and that the name maches your configuration\n","date":"2018-11-05T22:13:49+02:00","href":"https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/","tags":["network","networking","interfaces","ifconfig"],"title":"Troubles with interfaces after a VM clone"},{"author":"Kristof Vandam","content":"ncdu is a command line tool to scan and calculate directory and file sizes.\nComparison with \u0026lsquo;du\u0026rsquo; While the initial scan is about the same as du, ncdu keeps the results in memory. This can become handy when investigating the storage hog. You can compare the already cached results immediately with a (r) escan.\nAlso navigation is a breese. ncdu creates a interactive session where the arrow keys are used to open and close directories.\nOptions ncdu is not bloated with options, but each of these are useful and easy to remember. All these are used inside the interactive session.\n Key Description up, k Move cursor up down, j Move cursor down right/enter Open selected directory left, \u0026lt;, h Open parent directory n Sort by name s Sort by size C Sort by items d Delete selected file or directory t Toggle dirs before files when sorting g Show percentage and/or graph a Toggle between apparent size and disk usage c Toggle display of child item counts e Show/hide hidden or excluded files i Show information about selected item r Recalculate the current directory b Spawn shell in current directory q Quit ncdu Advanced ncdu JSON for development ncdu -x / -o- | jq -x chose directory \u0026lsquo;/\u0026rsquo; -o- output to stdout Will create a JSON object of the current directory and all his subdirectories. This can come handy for developing or generating reports.\nStore result ncdu -0xo- / | gzip \u0026gt; scan.gz -0 surpress unwanted output -x chose directory \u0026lsquo;/\u0026rsquo; -o- output to stdout Use stored result zcat scan.gz | ncdu -f- -f read from stdin Author Official Website\n","date":"2018-09-17T22:18:38+02:00","href":"https://blog.hagfi.sh/tools/ncdu/","tags":["du","ncdu","directory","size","inventory"],"title":"NCDU: NCurses Disk Usage"},{"author":"Kristof Vandam","content":"HUGO is static, that\u0026rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions that require a page refresh, this time of age performance is key, so that\u0026rsquo;s why I wanted a fast and fuzzy search implementation.\nResearch Some this I found which helped to get there are:\n here more specific here https://vuejs.org/ http://fusejs.io/ https://momentjs.com/ https://github.com/axios/axios Create a JSON object containing all articles Actually every data you want to search, in this guide (and on this website) I use the following data:\n Title Date Author Tags Content This is specified in a custom layout. Note the (dict \u0026quot;title\u0026quot; ...) line. You can add any data that HUGO processes (for each article). Its a list of key/values, the keys are presented between the quotes, the value as first value.\nlayouts/json/single.html\n{{- $.Scratch.Add \u0026quot;index\u0026quot; slice -}} {{- range where .Site.Pages \u0026quot;Type\u0026quot; \u0026quot;not in\u0026quot; (slice \u0026quot;page\u0026quot; \u0026quot;json\u0026quot;) -}} {{- $.Scratch.Add \u0026quot;index\u0026quot; (dict \u0026quot;title\u0026quot; .Title \u0026quot;date\u0026quot; .Date \u0026quot;author\u0026quot; .Params.author \u0026quot;href\u0026quot; .Permalink \u0026quot;tags\u0026quot; .Params.tags \u0026quot;content\u0026quot; .Plain) -}} {{- end -}} {{- $.Scratch.Get \u0026quot;index\u0026quot; | jsonify -}} Now, with this file in place the next thing to do is to create a content page, where this layout is used. This file triggers the creation of \u0026ldquo;index.json\u0026rdquo;.\ncontent/search.md\n--- date: \u0026quot;2017-03-05T21:10:52+01:00\u0026quot; type: \u0026quot;json\u0026quot; url: \u0026quot;index.json\u0026quot; --- Example of the data returned You can checkout the json object for this website, just go to https://hagfi.sh/index.json\n[ { \u0026quot;author\u0026quot;: \u0026quot;Kristof Vandam\u0026quot;, \u0026quot;content\u0026quot;: \u0026quot;HUGO is static, that\\u0026rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions that require a page refresh, this time of age performance is key, so that\\u0026rsquo;s why I wanted a fast and fuzzy search implementation. Research Some this I found which helped to get there are:\\n https://gohugo.io/tools/search/ \u0026quot;, \u0026quot;date\u0026quot;: \u0026quot;2018-08-29T22:44:46+02:00\u0026quot;, \u0026quot;href\u0026quot;: \u0026quot;http://localhost:1313/development/live-search-with-hugo/\u0026quot;, \u0026quot;tags\u0026quot;: null, \u0026quot;title\u0026quot;: \u0026quot;Live Search With HUGO\u0026quot; } ] Add the required dependencies (we use CDN\u0026rsquo;s) Make sure the following dependencies are loaded between the head tags. We use a little trick to let the browser decide if http or https is used. These are called Protocol-Relative URL\u0026rsquo;s.\n\u0026lt;script src=\u0026quot;//cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.js\u0026quot;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script src=\u0026quot;//cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.min.js\u0026quot;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script src=\u0026quot;//cdnjs.cloudflare.com/ajax/libs/axios/0.18.0/axios.min.js\u0026quot;\u0026gt;\u0026lt;/script\u0026gt; \u0026lt;script src=\u0026quot;//cdn.bootcss.com/fuse.js/3.2.0/fuse.min.js\u0026quot;\u0026gt;\u0026lt;/script\u0026gt; Add the actual search logic It\u0026rsquo;s a best practice to add the JavaScript right before the closing body tags. I highly suggest checking out VueJS with Webpack, but in this case a some simple JS inside script tags will do just fine.\nI will go over each section to clarify.\nvar app = new Vue({ el: '#app', data: { fuse: null, search: \u0026quot;\u0026quot;, result: [], index: [] }, mounted() { let self = this let options = { shouldSort: true, threshold: 0.6, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [ \u0026quot;title\u0026quot;, \u0026quot;author\u0026quot;, \u0026quot;date\u0026quot;, \u0026quot;content\u0026quot; ] } axios.get('/index.json') .then(function (response) { self.index = response.data self.fuse = new Fuse(response.data, options); self.result = fuse.search(\u0026quot;\u0026quot;); }) .catch(function (error) { console.log(error) }) }, watch: { search(nval, oval) { if (nval.length \u0026gt; 0) { this.result = this.fuse.search(nval) } else { this.result = [] } } } }) Create the Vue instance When creating a new Vue instance we assign Vue to a DOM element, most of the time an ID on your body tag is used.\nvar app = new Vue({ el: '#app', ... }) Create a data object This object is accesible across your DOM and Vue instance. Inside functions you can reffer to these with this.*.language-\nI initiated some variables like \u0026lsquo;fuse\u0026rsquo; so it can be used inside watch and methods.\ndata: { fuse: null, search: \u0026quot;\u0026quot;, result: [], index: [] }, What todo when everything is ready The mounted() function is triggered when everything ready to start processing your custom code. (This function used to name \u0026lsquo;ready()').\nWe assign this to self to handle some scope issues in the axios promise.\nWe polulate some options for FuseJS, note that the keys array is important here. Here we specify which keys of our index.json we want to search.\nThe index.json file is loaded with AJAX, this way the page should not wait for content that is not required immediately.\nWhen axios retrieves the date we create a Fuse instance (assigned to self.fuse (or this.fuse)).\nmounted() { let self = this let options = { shouldSort: true, threshold: 0.6, location: 0, distance: 100, maxPatternLength: 32, minMatchCharLength: 1, keys: [ \u0026quot;title\u0026quot;, \u0026quot;author\u0026quot;, \u0026quot;date\u0026quot;, \u0026quot;content\u0026quot; ] } axios.get('/index.json') .then(function (response) { self.index = response.data self.fuse = new Fuse(response.data, options); self.result = fuse.search(\u0026quot;\u0026quot;); }) .catch(function (error) { console.log(error) }) }, When something is entered inside the search field We watch for this.search to change, if it changes this function is called. Remember we set search: \u0026quot;\u0026quot; inside our data object? If the \u0026lsquo;nval\u0026rsquo; (New VALue) is larger than 0 characters we trigger the search function of fuse, which will return a new data set, but filtered. This dataset is stored inside this.result.language-\nIf the length of \u0026lsquo;nval\u0026rsquo; changes to 0 characters we hardcode the result to be an empty array (to prevent possible edgecases).\nwatch: { search(nval, oval) { if (nval.length \u0026gt; 0) { this.result = this.fuse.search(nval) } else { this.result = [] } } } Ok, cool, now how do I showcase the results? Well, it\u0026rsquo;s up to you. The most important parts in this example are:\n Bind this.search to the input field (with v-model) Loop through this.result with v-for, it will recreate the li tag \u0026lsquo;for each\u0026rsquo; result item. Use the result item, reffered as r. Links are extracted from the result item by the \u0026lsquo;href\u0026rsquo; key and bound to the href attribute. :href=\u0026quot;r.href\u0026quot; We use Moment.js to format the default (can be changed) HUGO date format to \u0026lsquo;D\u0026rsquo; (Day), \u0026lsquo;MMM\u0026rsquo; (Month, max 3 characters), \u0026lsquo;YYYY\u0026rsquo; (Full Year).\n\u0026lt;div class=\u0026quot;search-wrapper\u0026quot;\u0026gt; \u0026lt;input type=\u0026quot;text\u0026quot; placeholder=\u0026quot;Search ...\u0026quot; v-model=\u0026quot;search\u0026quot; class=\u0026quot;search\u0026quot;/\u0026gt; \u0026lt;ul class=\u0026quot;result-items\u0026quot;\u0026gt; \u0026lt;li v-for=\u0026quot;r of result\u0026quot; class=\u0026quot;result-item\u0026quot;\u0026gt; \u0026lt;div class=\u0026quot;result-item-wrapper\u0026quot;\u0026gt; \u0026lt;div class=\u0026quot;result-item-left\u0026quot;\u0026gt; \u0026lt;span class=\u0026quot;post-date\u0026quot;\u0026gt; \u0026lt;span class=\u0026quot;post-date-day\u0026quot;\u0026gt;\u0026lt;sup v-text=\u0026quot;moment(r.date).format('D')\u0026quot;\u0026gt;\u0026lt;/sup\u0026gt;\u0026lt;/span\u0026gt;\u0026lt;span class=\u0026quot;post-date-separator\u0026quot;\u0026gt;/\u0026lt;/span\u0026gt;\u0026lt;span class=\u0026quot;post-date-month\u0026quot; v-text=\u0026quot;moment(r.date).format('MMM')\u0026quot;\u0026gt;\u0026lt;/span\u0026gt; \u0026lt;span class=\u0026quot;post-date-year\u0026quot; v-text=\u0026quot;moment(r.date).format('YYYY')\u0026quot;\u0026gt;\u0026lt;/span\u0026gt; \u0026lt;/span\u0026gt; \u0026lt;template v-if=\u0026quot;r.author\u0026quot;\u0026gt;By \u0026lt;a class=\u0026quot;post-author\u0026quot; v-text=\u0026quot;r.author\u0026quot;\u0026gt;\u0026lt;/a\u0026gt;\u0026lt;/template\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;div class=\u0026quot;result-item-left\u0026quot;\u0026gt; \u0026lt;span class=\u0026quot;nav-item-separator\u0026quot;\u0026gt;//\u0026lt;/span\u0026gt;\u0026lt;a :href=\u0026quot;r.href\u0026quot; v-text=\u0026quot;r.title\u0026quot;\u0026gt;\u0026lt;/a\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;/div\u0026gt; \u0026lt;/li\u0026gt; \u0026lt;/ul\u0026gt; \u0026lt;/div\u0026gt; ","date":"2018-08-29T22:44:46+02:00","href":"https://blog.hagfi.sh/development/live-search-with-hugo/","tags":["vue","vuejs","prism","prismjs","hugo","javascript","js","json"],"title":"Live Search With HUGO"},{"author":"Olivier De Ram","content":"Let\u0026rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@domain.tld --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen.\nApache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known \u0026lt;Directory /var/www/vhosts/letsencrypt/.well-known\u0026gt; order allow,deny allow from all satisfy any \u0026lt;/Directory\u0026gt; Of (2) voeg volgende regels toe aan .htaccess: \u0026lt;IfModule mod_rewrite.c\u0026gt; RewriteEngine on #Allow Let's Encrypt SSL renewal RewriteRule ^.well-known/ - [L,NC] RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] Combineer Basic Auth met Let\u0026rsquo;s Encrypt:\nDit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI) \u0026lt;Directory /var/www/vhosts/WEB/ROOT\u0026gt; AuthType Basic AuthName protected AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd require valid-user Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# \u0026lt;/Directory\u0026gt; Nginx Voeg volgende regels toe aan Nginx location /.well-known { root /var/www/vhosts/WEB/ROOT; index index.html index.htm index.php; } Controleer DNS lijst domeinen: while read LINE; do echo $LINE \u0026gt;\u0026gt; list_processed.txt \u0026amp;\u0026amp; dig +short @9.9.9.9 $LINE \u0026gt;\u0026gt; list_processed.txt; done \u0026lt; list.txt (WIP) #!/bin/bash #IP=\u0026lt;%= @default_ipadress %\u0026gt; IP=$(dig +short @9.9.9.9 $(hostname)) FILE=$1 while read LINE do CHK=$(dig +short @9.9.9.9 $LINE) if $IP -eq $CHK echo \u0026quot;$LINE|$CHK\u0026quot; \u0026gt;\u0026gt; /tmp/le-ok elif echo \u0026quot;$LINE|$CHK\u0026quot; \u0026gt;\u0026gt; /tmp/le-nok fi done \u0026lt; $FILE echo \u0026quot;Domains OK:\u0026quot; echo /tmp/le-ok | column echo \u0026quot;-------------------------------\u0026quot; echo \u0026quot;Domains NOT OK:\u0026quot; echo /tmp/le-nok | column rm -rf /tmp/le-ok rm -rf /tmp/le-nok ","date":"2018-08-25T22:08:15+02:00","href":"https://blog.hagfi.sh/administration/letsencrypt/","tags":null,"title":"Let's Encrypt"},{"author":"Olivier De Ram","content":"MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size' =\u0026gt; \u0026lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. \u0026lsquo;open_files_limit\u0026rsquo; =\u0026gt; \u0026lsquo;4096\u0026rsquo;, Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. \u0026lsquo;join_buffer_size\u0026rsquo; =\u0026gt; \u0026lsquo;256K’, The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. Minimumgrootte van buffer voor index en table scans.\n \u0026lsquo;max_heap_table_size\u0026rsquo; =\u0026gt; \u0026lsquo;32M’, This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. Max grootte van user-created memory tables These 2 need to be the same size!!! \u0026lsquo;tmp_table_size\u0026rsquo; =\u0026gt; \u0026lsquo;32M’, The maximum size of internal in-memory temporary tables. Max grootte van interne in-memory tijdelijke tabellen\n table_cache=64 (maximumwaarde!!) Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it\u0026rsquo;ll keep opening and closing tables. Maximumwaarde voor caching van geopende tabellen. thread_cache_size=4 How many threads the server should cache for reuse. Aantal threads dat de server kan cachen voor hergebruik. \u0026lsquo;innodb_buffer_pool_size\u0026rsquo; =\u0026gt; \u0026lsquo;1G\u0026rsquo;, The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.\nSudo service mysql/mariadb reload (restart enkel onder toezicht)\n query_cache_*: query_cache_type\nNeeds to be set to 1 to enable caching.\nquery_cache_size\nIs the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.\nquery_cache_limit\nIs the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.\nMaximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.\ntable_open_cache\nIndicates the maximum number of tables the server keeps open\n innodb_buffer_pool_instances=2\nEnables the use of multiple threads for innodb.\nquery_cache_type=1\nEnables query caching.\njoin_buffer_size=1024K\nIncreased the buffer size for non-indexed joins.\ntmp_table_size=64M \u0026amp;\u0026amp; max_heap_table_size=64M\nIncreased the size for temporary tables.\njoin_buffer_size\nOmwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.\nmax_heap_table_size \u0026amp; tmp_table_size\nDe maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.\nthread_cache_size\nHet maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.\n","date":"2018-08-25T22:08:15+02:00","href":"https://blog.hagfi.sh/administration/mysql_tuner/","tags":null,"title":"MySQL Tuner"},{"author":"Olivier De Ram","content":"Windows troubleshooting VRAGEN:\n openen vanuit ticketing, wachtwoord en gebruiker custom even viewer view? test server? EventViewer run: eventvwr\n custom views windows application (non windows standard, puppet, vmware, mssql, \u0026hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma\u0026rsquo;s system: OS meldingen application and services: diep graven \u0026ndash;\u0026gt; Filter Log:\n logged (date range) event level event source event ID: 99,-1024,-4634 rechtsonderaan \u0026gt; event copy \u0026gt; copy as text\nPowerShell $first = $last = get-eventlog -Logname system - `get-winevent -LogName \u0026#39;Microsoft-Windows-TaskScheduler/Operational\u0026#39; | Where-Object { $_.Message -like ‘*insta* }` Task Viewer tasks users performance (indien gecrasht, bevestigen anders is het netwerk) Resource monitor (task manager \u0026gt; performance \u0026gt; open resouce monitor)\nOverview \u0026gt; CPU (ovenste tab) app aanvinken \u0026ndash;\u0026gt; filtert alles\nNetstat netstat -abo \u0026gt; C:\\temp\\log.txt\nChocolate C:\\ProgramData\\chocolatey\\bin\\Procmon.exe \u0026ndash;\u0026gt; selecteer lijn+kolom \u0026gt; exclude \u0026lsquo;name\u0026rsquo; (=grep -v) / include \u0026lsquo;name\u0026rsquo; (=grep)\nUsefull programs TreeView VBluescreenviewer Sysinternals Zabbix VMware events BareTail choco install choco list -lo (view choco installed programs) telnet 12.34.56.78 900 powershell: stop service 'name' EventID\u0026rsquo;s Event ID 6005: “The event log service was started.” This is synonymous to system startup.\n Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.\n Event ID 6008: \u0026ldquo;The previous system shutdown was unexpected.\u0026rdquo; Records that the system started after it was not shut down properly.\n Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.\n Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. Add to that a couple more from the Server Fault answers listed in my OP:\n Event ID 1074: \u0026ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.\u0026rdquo; Indicates that an application or a user initiated a restart or shutdown.\n Event ID 1076: \u0026ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.\u0026rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.\n PowerShell $filter = \u0026#34;*abbix*\u0026#34; get-winevent -logname \u0026#39;Application\u0026#39; | Where-Object { $_.Message -like $filter } ","date":"2018-08-25T22:08:15+02:00","href":"https://blog.hagfi.sh/administration/windows_troubleshooting/","tags":null,"title":"Windows troubleshooting"},{"author":"Kristof Vandam","content":"Create an encrypted partition that will automatically mount at boot.\nSometimes it\u0026rsquo;s nice to have encryption, sometimes it\u0026rsquo;s mandatory, either way, there are a couple of thing you should take in mind. Most solutions you find are at disk level but these have some pro\u0026rsquo;s and con\u0026rsquo;s.\n PRO\u0026rsquo;s CON\u0026rsquo;s Every application can work with it Data is only secured from physical theft No extra development required Can cause some overhead, as everything goes through encryption/decryption, everything There are also a couple of choisen you can make implementing LUKS, you could create a LVM layer on top of a LUKS partition or, what we are doing in this guide, add a LUKS encrypted mount on top of a LVM stack. The latter allows you to automatically mount the encrypted disk after or at boot time.\nAdd a new disk (LVM) This is unrelated to encrypting the disk, but in our setup we started by adding a new disk to the server.\nThe commands below are just some I often use as a group. From lines 1 to 3 you can just copy/paste. Line 1 makes sure a rescan is triggered to detect the newly added disk. 2 \u0026amp; 3 create some variables, which can be checked and used later. Make sure the output of these are what you expected. You can echo them as shown on 4 \u0026amp; 5.\nCreate a Physical Volume and extend the Volume Group \u0026lsquo;centos\u0026rsquo;\nroot@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo \u0026quot;- - -\u0026quot; \u0026gt; $i/scan; done root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d \u0026quot;[\u0026quot; -f2|cut -d \u0026quot;]\u0026quot; -f1) root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') root@server:/dev/centos # echo ${NEWDISK} sdd root@server:/dev/centos # echo ${VGROUP} centos root@server:/dev/centos # pvcreate /dev/${NEWDISK} Physical volume \u0026quot;/dev/sdd\u0026quot; successfully created. root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} Volume group \u0026quot;centos\u0026quot; successfully extended Create a logical volume (LVM) Add a Logical Volume named \u0026lsquo;encrypted\u0026rsquo; to the Volume Group \u0026lsquo;centos\u0026rsquo;.\nroot@server:/dev/centos # lvcreate -L 15G -n encrypted centos Logical volume \u0026quot;encrypted\u0026quot; created. Encrypt the partition Ok, the fun parts starts here (CAUTION before continueing make sure there is no important data on /dev/centos/encrypted, this will be wiped). We encrypt the Logical Volume with the first command. A passphrase is required (see it as a backup) LUKS can contain up to 5 different passwords. In a future section we add a second, more complex, password to use as key on boot. Hold tight.\nAfter the first command (the actual formatting of the partition) we need to \u0026lsquo;open\u0026rsquo; the partition. By opening we mean creating a new disk, but you should notice there is a password required to do so. Use the password you just created.\nroot@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted Create a mountpoint Before you can use the encrypted partition you should mount it. Do it like you always do it. Create a directory to mount to and mount /dev/mapper/luks-encrypted with mount.\nroot@server:/dev/mapper # mkdir /encrypted root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted From here on you are actually done, if you want to type password manually on every boot. I highly doubt you want that so lets go on. (It is ofourse more safe to do so).\nCreate a key (to auto-mount the encrypted disk) Create a key-file we can add to /etc/crypttab, any random string will do, but we create it with /dev/urandom. Make sure to set some strict permissions.\nroot@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 root@server:/dev/mapper # chmod 0400 /root/lukskey Unmount and add the key Add the key you just created to make it valid for LUKS, but first unmount the mount and close the vault.\nroot@server:/ # umount /encrypted root@server:/ # cryptsetup luksClose luks-encrypted root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey Get UUID Get the UUID of the disk, using the UUID to mount disk is a more solid solution than using the disknames (/dev/sd*). These disknames CAN change, the UUID cannot.\nroot@server:/ # blkid /dev/mapper/centos-encrypted /dev/mapper/centos-encrypted: UUID=\u0026quot;0dab9a5c-1870-478d-8d74-226eeb512f78\u0026quot; TYPE=\u0026quot;crypto_LUKS\u0026quot; Auto-mount LUKS (edit /etc/crypttab) Add a entry to the /etc/crypttab, see it as the /etc/fstab file. Just as fstab crypttab will automount the defined entries.\nroot@server:/ # blkid /dev/mapper/centos-encrypted /dev/mapper/centos-encrypted: UUID=\u0026quot;0dab9a5c-1870-478d-8d74-226eeb512f78\u0026quot; TYPE=\u0026quot;crypto_LUKS\u0026quot; Auto-mount LUKS (edit /etc/cypttab) luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks Check your work Congrats, this should be it, reboot and make sure the disk is mounted automatically.\n","date":"2018-08-23T22:08:15+02:00","href":"https://blog.hagfi.sh/administration/luks-encryption/","tags":["encryption","security","disk","partition"],"title":"Luks Encryption"}] \ No newline at end of file diff --git a/public/index.xml b/public/index.xml index 83e17f0..b4de3ac 100644 --- a/public/index.xml +++ b/public/index.xml @@ -1,495 +1,133 @@ - + Hagfi.sh - https://hagfi.sh/index.xml + https://blog.hagfi.sh/ Recent content on Hagfi.sh Hugo -- gohugo.io en-us - Sat, 25 Aug 2018 22:08:15 +0200 - + Fri, 30 Nov 2018 10:08:22 +0200 + + Yet Another Arch Guide + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + Fri, 30 Nov 2018 10:08:22 +0200 + + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + <p>Setting up Arch with other bells and whistles.</p> + - Let's Encrypt - https://hagfi.sh/administration/letsencrypt/ - Sat, 25 Aug 2018 22:08:15 +0200 + Bash Tips & Tricks + https://blog.hagfi.sh/administration/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 - https://hagfi.sh/administration/letsencrypt/ - - -<h2 id="let-s-encrypt">Let&rsquo;s Encrypt:</h2> - -<ul> -<li>Aanmaken / vernieuwen certificaat:</li> -</ul> - -<pre><code>/opt/letsencrypt/letsencrypt-auto certonly - --expand - ---email support@nucleus.be - --agree-tos - --webroot - -w /var/www/vhosts/WEB/ROOT - -d domain.tld - -d domainalias.tld - --dry-run -</code></pre> - -<pre><code>/bin/certbot - --text - --agree-tos - --non-interactive - certonly - -a webroot - --webroot-path /var/www/vhosts/WEB/ROOT - -d domain.tld - -d domainalias.tld - --dry-run -</code></pre> - -<p><code>--dry-run</code> om het aanmaken te testen.</p> - -<h3 id="apache-httpd">Apache / httpd</h3> - -<ul> -<li>(1) Voeg volgende regels toe aan de apache config:</li> -</ul> - -<pre><code>Alias /.well-known /var/www/vhosts/letsencrypt/.well-known -&lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; - order allow,deny - allow from all - satisfy any -&lt;/Directory&gt; -</code></pre> - -<ul> -<li>Of (2) voeg volgende regels toe aan .htaccess:</li> -</ul> - -<pre><code>&lt;IfModule mod_rewrite.c&gt; - RewriteEngine on - #Allow Let's Encrypt SSL renewal - RewriteRule ^.well-known/ - [L,NC] - RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/ - RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L] -</code></pre> - -<ul> -<li>Combineer Basic Auth met Let&rsquo;s Encrypt:<br /> -<em>Dit moet je bekijken ale een if/else. (Ofwel valid-user ofwel REQUEST_URI)</em></li> -</ul> - -<pre><code> &lt;Directory /var/www/vhosts/WEB/ROOT&gt; - AuthType Basic - AuthName protected - AuthUserFile /etc/httpd/passwd/phpmyadmin.htpasswd - require valid-user - Require expr %{REQUEST_URI} =~ m#^/.well-known/acme-challenge/.*# - &lt;/Directory&gt; -</code></pre> - -<h3 id="nginx">Nginx</h3> - -<ul> -<li>Voeg volgende regels toe aan Nginx</li> -</ul> - -<pre><code> location /.well-known { - root /var/www/vhosts/WEB/ROOT; - index index.html index.htm index.php; - } -</code></pre> - -<p>-</p> - -<ul> -<li>Controleer DNS lijst domeinen:</li> -</ul> - -<pre><code>while read LINE; -do - echo $LINE &gt;&gt; list_processed.txt &amp;&amp; dig +short @9.9.9.9 $LINE &gt;&gt; list_processed.txt; -done &lt; list.txt -</code></pre> - -<ul> -<li>(WIP) -<br /></li> -</ul> - -<pre><code>#!/bin/bash - -#IP=&lt;%= @default_ipadress %&gt; -IP=$(dig +short @9.9.9.9 $(hostname)) -FILE=$1 - -while read LINE -do - CHK=$(dig +short @9.9.9.9 $LINE) - if $IP -eq $CHK - echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-ok - elif - echo &quot;$LINE|$CHK&quot; &gt;&gt; /tmp/le-nok - fi -done &lt; $FILE - -echo &quot;Domains OK:&quot; -echo /tmp/le-ok | column -echo &quot;-------------------------------&quot; -echo &quot;Domains NOT OK:&quot; -echo /tmp/le-nok | column - -rm -rf /tmp/le-ok -rm -rf /tmp/le-nok -</code></pre> - + https://blog.hagfi.sh/administration/bash/ + <p>Usefull bash tips &amp; tricks</p> - MySQL Tuner - https://hagfi.sh/administration/mysql_tuner/ - Sat, 25 Aug 2018 22:08:15 +0200 + Changing boot targets + https://blog.hagfi.sh/administration/boot-targets/ + Fri, 09 Nov 2018 10:08:15 +0200 - https://hagfi.sh/administration/mysql_tuner/ - - -<h2 id="mysql-tuner">MySQL Tuner</h2> - -<table> -<thead> -<tr> -<th>WAARDE</th> -<th>ACTIE</th> -</tr> -</thead> - -<tbody> -<tr> -<td><code>query_cache_size</code></td> -<td>AFBLIJVEN</td> -</tr> - -<tr> -<td><code>table_cache</code></td> -<td>AFBLIJVEN <em>(maximumwaarde = 64)</em></td> -</tr> - -<tr> -<td><code>table_open_cache</code></td> -<td>AFBLIJVEN</td> -</tr> - -<tr> -<td><code>join_buffer_size</code></td> -<td>Verhogen indien <code>Joins performed without indexes++</code></td> -</tr> - -<tr> -<td><code>tmp_table_size</code></td> -<td>Verhogen = <code>max_heap_table_size</code></td> -</tr> - -<tr> -<td><code>max_heap_table_size</code></td> -<td>Verhogen <code>= tmp_table_size</code></td> -</tr> - -<tr> -<td><code>query_cache_type</code></td> -<td><code>=1</code> indien <code>=0</code></td> -</tr> -</tbody> -</table> - -<blockquote> -<p>mysql tuning improvements -<code>table_cache</code> NOOIT hoger dan 64 -Sudo vim /etc/my.cnf -query_cache_size&rsquo; =&gt; &lsquo;256M’, -It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. -Caching voor select queries en bijhorende result sets, wat het mogelijk maakt om identieke selects sneller op te vragen uit memory. -&lsquo;open_files_limit&rsquo; =&gt; &lsquo;4096&rsquo;, -Changes the number of file descriptors available to mysqld. You should try increasing the value of this option if mysqld gives you the error Too many open files. -&lsquo;join_buffer_size&rsquo; =&gt; &lsquo;256K’, -The minimum size of the buffer that is used for plain index scans, range index scans, and joins that do not use indexes and thus perform full table scans. Normally, the best way to get fast joins is to add indexes. Increase the value of join_buffer_size to get a faster full join when adding indexes is not possible. -Minimumgrootte van buffer voor index en table scans.</p> -</blockquote> - -<hr /> - -<blockquote> -<p>&lsquo;max_heap_table_size&rsquo; =&gt; &lsquo;32M’, -This variable sets the maximum size to which user-created MEMORY tables are permitted to grow. -Max grootte van user-created memory tables -These 2 need to be the same size!!! -&lsquo;tmp_table_size&rsquo; =&gt; &lsquo;32M’, -The maximum size of internal in-memory temporary tables. -Max grootte van interne in-memory tijdelijke tabellen</p> -</blockquote> - -<hr /> - -<blockquote> -<p>table_cache=64 (maximumwaarde!!) -Table_Cache should always - well mostly anyway - be significantly bigger than the total number of tables in the server. Otherwise it&rsquo;ll keep opening and closing tables. -Maximumwaarde voor caching van geopende tabellen. -thread_cache_size=4 -How many threads the server should cache for reuse. -Aantal threads dat de server kan cachen voor hergebruik. -&lsquo;innodb_buffer_pool_size&rsquo; =&gt; &lsquo;1G&rsquo;, -The size in bytes of the buffer pool, the memory area where InnoDB caches table and index data. The default value is 128MB.</p> -</blockquote> - -<p>Sudo service mysql/mariadb reload (restart enkel onder toezicht)</p> - -<ul> -<li><code>query_cache_*</code>:</li> -</ul> - -<blockquote> -<p><code>query_cache_type</code><br /> -Needs to be set to 1 to enable caching.<br /> -<code>query_cache_size</code><br /> -Is the size of the cache. This can be in bytes, or you can use a M suffix to specify the amount of megabytes.<br /> -<code>query_cache_limit</code><br /> -Is the maximum size of an individually cached query. Queries over this size won’t go into the cache. This is also in bytes, or megabytes with the M suffix. 1MB is a safe bet.<br /> -Maximumgrootte voor elke individuele gecachte query. Queries groter dan dit zullen niet gecacht worden.<br /> -<code>table_open_cache</code><br /> -Indicates the maximum number of tables the server keeps open</p> -</blockquote> - -<hr /> - -<p><code>innodb_buffer_pool_instances=2</code><br /> -<em>Enables the use of multiple threads for innodb.</em></p> - -<p><code>query_cache_type=1</code><br /> -<em>Enables query caching.</em></p> - -<p><code>join_buffer_size=1024K</code><br /> -<em>Increased the buffer size for non-indexed joins.</em></p> - -<p><code>tmp_table_size=64M &amp;&amp; max_heap_table_size=64M</code><br /> -<em>Increased the size for temporary tables.</em></p> - -<p><code>join_buffer_size</code><br /> -<em>Omwille van het aantal JOIN queries uitgevoerd zonder indexes, werd de minimumgrootte van de buffer voor index en table scans verhoogd.</em></p> - -<p><code>max_heap_table_size &amp; tmp_table_size</code><br /> -<em>De maximale grootte van user-created memory tables en van interne in-memory tijdelijke tabellen werd verhoogd.</em></p> - -<p><code>thread_cache_size</code><br /> -<em>Het maximale aantal threads dat de server kan cachen voor hergebruik werd verhoogd.</em></p> - + https://blog.hagfi.sh/administration/boot-targets/ + <p>Switch between run levels / environments.</p> - Windows troubleshooting - https://hagfi.sh/administration/windows_troubleshooting/ + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + Let's Encrypt + https://blog.hagfi.sh/administration/letsencrypt/ Sat, 25 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/windows_troubleshooting/ - - -<h2 id="windows-troubleshooting">Windows troubleshooting</h2> - -<p>VRAGEN: -+ openen vanuit ticketing, wachtwoord en gebruiker -+ custom even viewer view? -+ test server?</p> - -<h3 id="eventviewer"><em>EventViewer</em></h3> - -<p>run: eventvwr</p> - -<ul> -<li>custom views</li> -<li>windows - -<ul> -<li>application (non windows standard, puppet, vmware, mssql, &hellip;)</li> -<li>security, aan en afmelden</li> -<li>set-up: updates en installatie verwijderen programma&rsquo;s</li> -<li>system: OS meldingen</li> -</ul></li> -<li>application and services: diep graven -<br /> -<br /></li> -</ul> - -<p>&ndash;&gt; Filter Log:</p> - -<ul> -<li>logged (date range)<br /></li> -<li>event level<br /></li> -<li>event source<br /></li> -<li>event ID: 99,-1024,-4634<br /></li> -</ul> - -<p>rechtsonderaan &gt; event copy &gt; copy as text</p> - -<h3 id="powershell"><em>PowerShell</em></h3> - -<pre><code class="language-PowerShell">$first = -$last = -get-eventlog -Logname system - -</code></pre> - -<pre><code class="language-PowerShell"> `get-winevent -LogName 'Microsoft-Windows-TaskScheduler/Operational' | Where-Object { $_.Message -like ‘*insta* }` -</code></pre> - -<h3 id="task-viewer"><em>Task Viewer</em></h3> - -<ul> -<li>tasks</li> -<li>users</li> -<li>performance (indien gecrasht, bevestigen anders is het netwerk)</li> -</ul> - -<h3 id="resource-monitor"><em>Resource monitor</em></h3> - -<p>(task manager &gt; performance &gt; open resouce monitor)</p> - -<p>Overview &gt; CPU (ovenste tab) app aanvinken &ndash;&gt; filtert alles</p> - -<h3 id="netstat"><em>Netstat</em></h3> - -<p><code>netstat -abo &gt; C:\temp\log.txt</code></p> - -<h3 id="chocolate"><em>Chocolate</em></h3> - -<p>C:\ProgramData\chocolatey\bin\Procmon.exe -&ndash;&gt; selecteer lijn+kolom &gt; exclude &lsquo;name&rsquo; (=grep -v) / include &lsquo;name&rsquo; (=grep)</p> - -<h3 id="usefull-programs"><em>Usefull programs</em></h3> - -<ul> -<li>TreeView</li> -<li>VBluescreenviewer</li> -<li>Sysinternals</li> -<li>Zabbix</li> -<li>VMware events</li> -<li>BareTail</li> -<li>choco install</li> -<li>choco list -lo (view choco installed programs)</li> -<li>telnet 12.34.56.78 900</li> -<li>powershell: <code>stop service 'name'</code></li> -</ul> - -<h3 id="eventid-s"><em>EventID&rsquo;s</em></h3> - -<ul> -<li>Event ID 6005: “The event log service was started.” This is synonymous to system startup.</li> -<li>Event ID 6006: “The event log service was stopped.” This is synonymous to system shutdown.</li> -<li>Event ID 6008: &ldquo;The previous system shutdown was unexpected.&rdquo; Records that the system started after it was not shut down properly.</li> -<li>Event ID 6009: Indicates the Windows product name, version, build number, service pack number, and operating system type detected at boot time.</li> - -<li><p>Event ID 6013: Displays the uptime of the computer. There is no TechNet page for this id. -Add to that a couple more from the Server Fault answers listed in my OP:</p></li> - -<li><p>Event ID 1074: &ldquo;The process X has initiated the restart / shutdown of computer on behalf of user Y for the following reason: Z.&rdquo; Indicates that an application or a user initiated a restart or shutdown.</p></li> - -<li><p>Event ID 1076: &ldquo;The reason supplied by user X for the last unexpected shutdown of this computer is: Y.&rdquo; Records when the first user with shutdown privileges logs on to the computer after an unexpected restart or shutdown and supplies a reason for the occurrence.</p></li> -</ul> - -<h3 id="powershell-1"><em>PowerShell</em></h3> - -<pre><code class="language-PowerShell">$filter = &quot;*abbix*&quot; -get-winevent -logname 'Application' | Where-Object { $_.Message -like $filter } -</code></pre> - + https://blog.hagfi.sh/administration/letsencrypt/ + Let&rsquo;s Encrypt: Aanmaken / vernieuwen certificaat: /opt/letsencrypt/letsencrypt-auto certonly --expand ---email support@domain.tld --agree-tos --webroot -w /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run /bin/certbot --text --agree-tos --non-interactive certonly -a webroot --webroot-path /var/www/vhosts/WEB/ROOT -d domain.tld -d domainalias.tld --dry-run --dry-run om het aanmaken te testen. +Apache / httpd (1) Voeg volgende regels toe aan de apache config: Alias /.well-known /var/www/vhosts/letsencrypt/.well-known &lt;Directory /var/www/vhosts/letsencrypt/.well-known&gt; order allow,deny allow from all satisfy any &lt;/Directory&gt; Of (2) voeg volgende regels toe aan . - Dont Let Your Application Interfere With Letsencrypt - https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/ - Thu, 23 Aug 2018 22:46:41 +0200 + MySQL Tuner + https://blog.hagfi.sh/administration/mysql_tuner/ + Sat, 25 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/ - - -<h2 id="tips-and-tricks-to-keep-letsencrypt-working">Tips and tricks to keep letsencrypt working</h2> - + https://blog.hagfi.sh/administration/mysql_tuner/ + MySQL Tuner WAARDE ACTIE query_cache_size AFBLIJVEN table_cache AFBLIJVEN (maximumwaarde = 64) table_open_cache AFBLIJVEN join_buffer_size Verhogen indien Joins performed without indexes++ tmp_table_size Verhogen = max_heap_table_size max_heap_table_size Verhogen = tmp_table_size query_cache_type =1 indien =0 mysql tuning improvements table_cache NOOIT hoger dan 64 Sudo vim /etc/my.cnf query_cache_size' =&gt; &lsquo;256M’, It caches the select query along with the result set, which enables the identical selects to execute faster as the data fetches from the in memory. - Vue Js - https://hagfi.sh/development/vue-js/ - Thu, 23 Aug 2018 22:44:46 +0200 + Windows troubleshooting + https://blog.hagfi.sh/administration/windows_troubleshooting/ + Sat, 25 Aug 2018 22:08:15 +0200 - https://hagfi.sh/development/vue-js/ - - -<h2 id="awesomeness-about-vuejs">Awesomeness about VueJS</h2> - + https://blog.hagfi.sh/administration/windows_troubleshooting/ + Windows troubleshooting VRAGEN: + openen vanuit ticketing, wachtwoord en gebruiker custom even viewer view? test server? EventViewer run: eventvwr + custom views windows application (non windows standard, puppet, vmware, mssql, &hellip;) security, aan en afmelden set-up: updates en installatie verwijderen programma&rsquo;s system: OS meldingen application and services: diep graven &ndash;&gt; Filter Log: + logged (date range) event level event source event ID: 99,-1024,-4634 rechtsonderaan &gt; event copy &gt; copy as text Luks Encryption - https://hagfi.sh/administration/luks-encryption/ + https://blog.hagfi.sh/administration/luks-encryption/ Thu, 23 Aug 2018 22:08:15 +0200 - https://hagfi.sh/administration/luks-encryption/ - - -<h2 id="add-a-new-disk-lvm">Add a new disk (LVM)</h2> - -<pre><code>root@server:/dev/centos # for i in /sys/class/scsi_host/host*; do echo &quot;- - -&quot; &gt; $i/scan; done -root@server:/dev/centos # NEWDISK=$(dmesg|tail|grep 'Attached'|awk '{print $4}'|tail -n1|cut -d &quot;[&quot; -f2|cut -d &quot;]&quot; -f1) -root@server:/dev/centos # VGROUP=$(vgdisplay|grep Name|head -n1|awk '{print $3}') -root@server:/dev/centos # echo ${NEWDISK} -sdd -root@server:/dev/centos # echo ${VGROUP} -centos -root@server:/dev/centos # pvcreate /dev/${NEWDISK} -Physical volume &quot;/dev/sdd&quot; successfully created. -root@server:/dev/centos # vgextend ${VGROUP} /dev/${NEWDISK} -Volume group &quot;centos&quot; successfully extended -</code></pre> - -<h2 id="create-a-logical-volume-lvm">Create a logical volume (LVM)</h2> - -<pre><code>root@server:/dev/centos # lvcreate -L 15G -n encrypted centos -Logical volume &quot;encrypted&quot; created. -</code></pre> - -<h2 id="encrypt-the-partition">Encrypt the partition</h2> - -<pre><code>root@server:/dev/centos # cryptsetup -v --verify-passphrase luksFormat /dev/centos/encrypted -root@server:/dev/mapper # cryptsetup luksOpen /dev/centos/encrypted luks-encrypted -</code></pre> - -<h2 id="create-a-mountpoint">Create a mountpoint</h2> - -<pre><code>root@server:/dev/mapper # mkdir /encrypted -root@server:/dev/mapper # mount /dev/mapper/luks-encrypted /encrypted -</code></pre> - -<h2 id="create-a-key-to-auto-mount-the-encrypted-disk">Create a key (to auto-mount the encrypted disk)</h2> - -<pre><code>root@server:/dev/mapper # dd if=/dev/urandom of=/root/lukskey bs=1024 count=4 -root@server:/dev/mapper # chmod 0400 /root/lukskey -</code></pre> - -<h2 id="unmount-and-add-the-key">Unmount and add the key</h2> - -<pre><code>root@server:/ # umount /encrypted -root@server:/ # cryptsetup luksClose luks-encrypted -root@server:/ # cryptsetup luksAddKey /dev/mapper/centos-encrypted /root/lukskey -</code></pre> - -<h2 id="get-uuid">Get UUID</h2> - -<pre><code>root@server:/ # blkid /dev/mapper/centos-encrypted -/dev/mapper/centos-encrypted: UUID=&quot;0dab9a5c-1870-478d-8d74-226eeb512f78&quot; TYPE=&quot;crypto_LUKS&quot; -</code></pre> - -<h2 id="auto-mount-luks-edit-etc-cypttab">Auto-mount LUKS (edit /etc/cypttab)</h2> - -<pre><code>luks-encrypted /dev/disk/by-uuid/0dab9a5c-1870-478d-8d74-226eeb512f78 /root/lukskey luks -</code></pre> - + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> + + + + + https://blog.hagfi.sh/index.json + Sun, 05 Mar 2017 21:10:52 +0100 + + https://blog.hagfi.sh/index.json + - \ No newline at end of file + diff --git a/public/js/prism.js b/public/js/prism.js new file mode 100644 index 0000000..70ef88b --- /dev/null +++ b/public/js/prism.js @@ -0,0 +1,46 @@ +/* PrismJS 1.15.0 +https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+apacheconf+bash+ruby+docker+markup-templating+go+less+json+erb+nginx+php+sql+powershell+puppet+python+stylus+pug+yaml&plugins=line-numbers+toolbar+command-line+show-language */ +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.markup,Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; +Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/^(\s*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding|AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch|Allow|AllowCONNECT|AllowEncodedSlashes|AllowMethods|AllowOverride|AllowOverrideList|Anonymous|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail|AsyncRequestWorkerFactor|AuthBasicAuthoritative|AuthBasicFake|AuthBasicProvider|AuthBasicUseDigestAlgorithm|AuthDBDUserPWQuery|AuthDBDUserRealmQuery|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm|AuthDigestDomain|AuthDigestNonceLifetime|AuthDigestProvider|AuthDigestQop|AuthDigestShmemSize|AuthFormAuthoritative|AuthFormBody|AuthFormDisableNoStore|AuthFormFakeBasicAuth|AuthFormLocation|AuthFormLoginRequiredLocation|AuthFormLoginSuccessLocation|AuthFormLogoutLocation|AuthFormMethod|AuthFormMimetype|AuthFormPassword|AuthFormProvider|AuthFormSitePassphrase|AuthFormSize|AuthFormUsername|AuthGroupFile|AuthLDAPAuthorizePrefix|AuthLDAPBindAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareAsUser|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPInitialBindAsUser|AuthLDAPInitialBindPattern|AuthLDAPMaxSubGroupDepth|AuthLDAPRemoteUserAttribute|AuthLDAPRemoteUserIsDN|AuthLDAPSearchAsUser|AuthLDAPSubGroupAttribute|AuthLDAPSubGroupClass|AuthLDAPUrl|AuthMerging|AuthName|AuthnCacheContext|AuthnCacheEnable|AuthnCacheProvideFor|AuthnCacheSOCache|AuthnCacheTimeout|AuthnzFcgiCheckAuthnProvider|AuthnzFcgiDefineProvider|AuthType|AuthUserFile|AuthzDBDLoginToReferer|AuthzDBDQuery|AuthzDBDRedirectQuery|AuthzDBMType|AuthzSendForbiddenOnFailure|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|CacheDefaultExpire|CacheDetailHeader|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheFile|CacheHeader|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheIgnoreQueryString|CacheIgnoreURLSessionIdentifiers|CacheKeyBaseURL|CacheLastModifiedFactor|CacheLock|CacheLockMaxAge|CacheLockPath|CacheMaxExpire|CacheMaxFileSize|CacheMinExpire|CacheMinFileSize|CacheNegotiatedDocs|CacheQuickHandler|CacheReadSize|CacheReadTime|CacheRoot|CacheSocache|CacheSocacheMaxSize|CacheSocacheMaxTime|CacheSocacheMinTime|CacheSocacheReadSize|CacheSocacheReadTime|CacheStaleOnError|CacheStoreExpired|CacheStoreNoStore|CacheStorePrivate|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateInflateLimitRequestBody|DeflateInflateRatioBurst|DeflateInflateRatioLimit|DeflateMemLevel|DeflateWindowSize|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|HeartbeatAddress|HeartbeatListen|HeartbeatMaxServers|HeartbeatStorage|HeartbeatStorage|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|IndexHeadInsert|IndexIgnore|IndexIgnoreReset|IndexOptions|IndexOrderDefault|IndexStyleSheet|InputSed|ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionPoolTTL|LDAPConnectionTimeout|LDAPLibraryDebug|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPReferralHopLimit|LDAPReferrals|LDAPRetries|LDAPRetryDelay|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTimeout|LDAPTrustedClientCert|LDAPTrustedGlobalCert|LDAPTrustedMode|LDAPVerifyServerCert|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|LuaHookAccessChecker|LuaHookAuthChecker|LuaHookCheckUserID|LuaHookFixups|LuaHookInsertFilter|LuaHookLog|LuaHookMapToStorage|LuaHookTranslateName|LuaHookTypeChecker|LuaInherit|LuaInputFilter|LuaMapHandler|LuaOutputFilter|LuaPackageCPath|LuaPackagePath|LuaQuickHandler|LuaRoot|LuaScope|MaxConnectionsPerChild|MaxKeepAliveRequests|MaxMemFree|MaxRangeOverlaps|MaxRangeReversals|MaxRanges|MaxRequestWorkers|MaxSpareServers|MaxSpareThreads|MaxThreads|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|ProxyAddHeaders|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyExpressDBMFile|ProxyExpressDBMType|ProxyExpressEnable|ProxyFtpDirCharset|ProxyFtpEscapeWildcards|ProxyFtpListOnWildcard|ProxyHTMLBufSize|ProxyHTMLCharsetOut|ProxyHTMLDocType|ProxyHTMLEnable|ProxyHTMLEvents|ProxyHTMLExtended|ProxyHTMLFixups|ProxyHTMLInterp|ProxyHTMLLinks|ProxyHTMLMeta|ProxyHTMLStripComments|ProxyHTMLURLMap|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassInherit|ProxyPassInterpolateEnv|ProxyPassMatch|ProxyPassReverse|ProxyPassReverseCookieDomain|ProxyPassReverseCookiePath|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxySCGIInternalRedirect|ProxySCGISendfile|ProxySet|ProxySourceAddress|ProxyStatus|ProxyTimeout|ProxyVia|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIPHeader|RemoteIPInternalProxy|RemoteIPInternalProxyList|RemoteIPProxiesHeader|RemoteIPTrustedProxy|RemoteIPTrustedProxyList|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|RewriteBase|RewriteCond|RewriteEngine|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen|SeeRequestTail|SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|Session|SessionCookieName|SessionCookieName2|SessionCookieRemove|SessionCryptoCipher|SessionCryptoDriver|SessionCryptoPassphrase|SessionCryptoPassphraseFile|SessionDBDCookieName|SessionDBDCookieName2|SessionDBDCookieRemove|SessionDBDDeleteLabel|SessionDBDInsertLabel|SessionDBDPerUser|SessionDBDSelectLabel|SessionDBDUpdateLabel|SessionEnv|SessionExclude|SessionHeader|SessionInclude|SessionMaxAge|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath|SSLCADNRequestFile|SSLCADNRequestPath|SSLCARevocationCheck|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLCompression|SSLCryptoDevice|SSLEngine|SSLFIPS|SSLHonorCipherOrder|SSLInsecureRenegotiation|SSLOCSPDefaultResponder|SSLOCSPEnable|SSLOCSPOverrideResponder|SSLOCSPResponderTimeout|SSLOCSPResponseMaxAge|SSLOCSPResponseTimeSkew|SSLOCSPUseRequestNonce|SSLOpenSSLConfCmd|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationCheck|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCheckPeerCN|SSLProxyCheckPeerExpire|SSLProxyCheckPeerName|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateChainFile|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRenegBufferSize|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLSessionTicketKeyFile|SSLSRPUnknownUserSeed|SSLSRPVerifierFile|SSLStaplingCache|SSLStaplingErrorCacheTimeout|SSLStaplingFakeTryLater|SSLStaplingForceURL|SSLStaplingResponderTimeout|SSLStaplingResponseMaxAge|SSLStaplingResponseTimeSkew|SSLStaplingReturnResponderErrors|SSLStaplingStandardCacheTimeout|SSLStrictSNIVHostCheck|SSLUserName|SSLUseStapling|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:AuthnProviderAlias|AuthzProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|RequireAll|RequireAny|RequireNone|VirtualHost)\b *.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:\w,?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}]}(Prism); +Prism.languages.docker={keyword:{pattern:/(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/im,lookbehind:!0},string:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,comment:/#.*/,punctuation:/---|\.\.\.|[:[\]{}\-,|>?]/},Prism.languages.dockerfile=Prism.languages.docker; +Prism.languages["markup-templating"]={},Object.defineProperties(Prism.languages["markup-templating"],{buildPlaceholders:{value:function(e,t,n,a){e.language===t&&(e.tokenStack=[],e.code=e.code.replace(n,function(n){if("function"==typeof a&&!a(n))return n;for(var r=e.tokenStack.length;-1!==e.code.indexOf("___"+t.toUpperCase()+r+"___");)++r;return e.tokenStack[r]=n,"___"+t.toUpperCase()+r+"___"}),e.grammar=Prism.languages.markup)}},tokenizePlaceholders:{value:function(e,t){if(e.language===t&&e.tokenStack){e.grammar=Prism.languages[t];var n=0,a=Object.keys(e.tokenStack),r=function(o){if(!(n>=a.length))for(var i=0;i-1){++n;var f,u=l.substring(0,p),_=new Prism.Token(t,Prism.tokenize(s,e.grammar,t),"language-"+t,s),k=l.substring(p+("___"+t.toUpperCase()+c+"___").length);if(u||k?(f=[u,_,k].filter(function(e){return!!e}),r(f)):f=_,"string"==typeof g?Array.prototype.splice.apply(o,[i,1].concat(f)):g.content=f,n>=a.length)break}}else g.content&&"string"!=typeof g.content&&r(g.content)}};r(e.tokens)}}}}); +Prism.languages.go=Prism.languages.extend("clike",{keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,"boolean":/\b(?:_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete Prism.languages.go["class-name"]; +Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,punctuation:/[{}();:,]/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","punctuation",{"function":Prism.languages.less.function}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); +Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*([Ee][+-]?\d+)?/,punctuation:/[{}[\],]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json; +!function(e){e.languages.erb=e.languages.extend("ruby",{}),e.languages.insertBefore("erb","comment",{delimiter:{pattern:/^<%=?|%>$/,alias:"punctuation"}}),e.hooks.add("before-tokenize",function(a){var n=/<%=?[\s\S]+?%>/g;e.languages["markup-templating"].buildPlaceholders(a,"erb",n)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"erb")})}(Prism); +Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types)\b/i}),Prism.languages.insertBefore("nginx","keyword",{variable:/\$[a-z_]+/i}); +!function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i,constant:/\b[A-Z0-9_]{2,}\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},"function":/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; +Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{"function":{pattern:/(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,"boolean":/\$(?:true|false)\b/i,variable:/\$\w+\b/i,"function":[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},Prism.languages.powershell.string[0].inside.boolean=Prism.languages.powershell.boolean,Prism.languages.powershell.string[0].inside.variable=Prism.languages.powershell.variable,Prism.languages.powershell.string[0].inside.function.inside=Prism.languages.powershell; +!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\w+|\*)(?=\s*=>)/,"function":[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,"boolean":/\b(?:true|false)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism); +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/}; +!function(n){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,"boolean":/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{"function":/^[^(]+/,rest:t}},n.languages.stylus={comment:{pattern:/(^|[^\\])(\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); +!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ]+.+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{rest:e.languages.javascript}},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:{rest:e.languages.markup}},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:if|unless|else|case|when|default|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,"function":/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]+).+/m,lookbehind:!0,inside:{rest:e.languages.javascript}},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]+).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:{rest:e.languages.javascript}},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:{rest:e.languages.javascript}},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:{rest:e.languages.javascript}}],punctuation:/[.\-!=|]+/};for(var t="(^([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r(?!\\n))(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+",n=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","hogan","less","livescript","markdown","mustache","plates",{filter:"sass",language:"scss"},"stylus","swig"],a={},i=0,r=n.length;r>i;i++){var s=n[i];s="string"==typeof s?{filter:s,language:s}:s,e.languages[s.language]&&(a["filter-"+s.filter]={pattern:RegExp(t.replace("{{filter_name}}",s.filter),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},rest:e.languages[s.language]}})}e.languages.insertBefore("pug","filter",a)}(Prism); +Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./}; +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e="line-numbers",t=/\n(?!$)/g,n=function(e){var n=r(e),s=n["white-space"];if("pre-wrap"===s||"pre-line"===s){var l=e.querySelector("code"),i=e.querySelector(".line-numbers-rows"),a=e.querySelector(".line-numbers-sizer"),o=l.textContent.split(t);a||(a=document.createElement("span"),a.className="line-numbers-sizer",l.appendChild(a)),a.style.display="block",o.forEach(function(e,t){a.textContent=e||"\n";var n=a.getBoundingClientRect().height;i.children[t].style.height=n+"px"}),a.textContent="",a.style.display="none"}},r=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null};window.addEventListener("resize",function(){Array.prototype.forEach.call(document.querySelectorAll("pre."+e),n)}),Prism.hooks.add("complete",function(e){if(e.code){var r=e.element.parentNode,s=/\s*\bline-numbers\b\s*/;if(r&&/pre/i.test(r.nodeName)&&(s.test(r.className)||s.test(e.element.className))&&!e.element.querySelector(".line-numbers-rows")){s.test(e.element.className)&&(e.element.className=e.element.className.replace(s," ")),s.test(r.className)||(r.className+=" line-numbers");var l,i=e.code.match(t),a=i?i.length+1:1,o=new Array(a+1);o=o.join(""),l=document.createElement("span"),l.setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=o,r.hasAttribute("data-start")&&(r.style.counterReset="linenumber "+(parseInt(r.getAttribute("data-start"),10)-1)),e.element.appendChild(l),n(r),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(t,n){if("PRE"===t.tagName&&t.classList.contains(e)){var r=t.querySelector(".line-numbers-rows"),s=parseInt(t.getAttribute("data-start"),10)||1,l=s+(r.children.length-1);s>n&&(n=s),n>l&&(n=l);var i=n-s;return r.children[i]}}}}}(); +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var t=[],e={},n=function(){};Prism.plugins.toolbar={};var a=Prism.plugins.toolbar.registerButton=function(n,a){var o;o="function"==typeof a?a:function(t){var e;return"function"==typeof a.onClick?(e=document.createElement("button"),e.type="button",e.addEventListener("click",function(){a.onClick.call(this,t)})):"string"==typeof a.url?(e=document.createElement("a"),e.href=a.url):e=document.createElement("span"),e.textContent=a.text,e},t.push(e[n]=o)},o=Prism.plugins.toolbar.hook=function(a){var o=a.element.parentNode;if(o&&/pre/i.test(o.nodeName)&&!o.parentNode.classList.contains("code-toolbar")){var r=document.createElement("div");r.classList.add("code-toolbar"),o.parentNode.insertBefore(r,o),r.appendChild(o);var i=document.createElement("div");i.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(t=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return e[t]||n})),t.forEach(function(t){var e=t(a);if(e){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(e),i.appendChild(n)}}),r.appendChild(i)}};a("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var n,a,o=e.getAttribute("data-label");try{a=document.querySelector("template#"+o)}catch(r){}return a?n=a.content:(e.hasAttribute("data-url")?(n=document.createElement("a"),n.href=e.getAttribute("data-url")):n=document.createElement("span"),n.textContent=o),n}}),Prism.hooks.add("complete",o)}}(); +//!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e=/\s*\bcommand-line\b\s*/;Prism.hooks.add("before-highlight",function(a){if(a.vars=a.vars||{},a.vars["command-line"]=a.vars["command-line"]||{},a.vars["command-line"].complete||!a.code)return a.vars["command-line"].complete=!0,void 0;var n=a.element.parentNode;if(!n||!/pre/i.test(n.nodeName)||!e.test(n.className)&&!e.test(a.element.className))return a.vars["command-line"].complete=!0,void 0;if(a.element.querySelector(".command-line-prompt"))return a.vars["command-line"].complete=!0,void 0;var t=a.code.split("\n");a.vars["command-line"].numberOfLines=t.length,a.vars["command-line"].outputLines=[];var r=n.getAttribute("data-output"),s=n.getAttribute("data-filter-output");if(r||""===r){r=r.split(",");for(var o=0;oi&&(i=1),l>t.length&&(l=t.length),i--,l--;for(var d=i;l>=d;d++)a.vars["command-line"].outputLines[d]=t[d],t[d]=""}}}else if(s)for(var o=0;o');else{var o=t("data-user","user"),m=t("data-host","localhost");r=r.join('')}var i=document.createElement("span");i.className="command-line-prompt",i.innerHTML=r;for(var l=0;l - - + + - https://hagfi.sh/administration/letsencrypt/ + https://blog.hagfi.sh/categories/administration/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/administration/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/tags/arch/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/categories/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/tags/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + 2018-11-30T10:08:22+02:00 + + https://blog.hagfi.sh/tags/bash/ + 2018-11-11T16:01:15+01:00 + + https://blog.hagfi.sh/administration/bash/ + 2018-11-11T16:01:15+01:00 + + https://blog.hagfi.sh/categories/development/ + 2018-11-11T16:01:15+01:00 + + https://blog.hagfi.sh/tags/script/ + 2018-11-11T16:01:15+01:00 + + https://blog.hagfi.sh/tags/boot/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/administration/boot-targets/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/tags/data/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/tags/linux/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/tags/mount/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/administration/autofs/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/tags/security/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/tags/shares/ + 2018-11-09T10:08:15+02:00 + + https://blog.hagfi.sh/tags/directory/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tools/fatrace/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/ifconfig/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/interfaces/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/inventory/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/network/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/networking/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/size/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tools/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/categories/tools/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + 2018-11-05T22:13:49+02:00 + + https://blog.hagfi.sh/tags/du/ + 2018-09-17T22:18:38+02:00 + + https://blog.hagfi.sh/tags/ncdu/ + 2018-09-17T22:18:38+02:00 + + https://blog.hagfi.sh/tools/ncdu/ + 2018-09-17T22:18:38+02:00 + + https://blog.hagfi.sh/development/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/hugo/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/javascript/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/js/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/json/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/prism/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/prismjs/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/vue/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/tags/vuejs/ + 2018-08-29T22:44:46+02:00 + + https://blog.hagfi.sh/administration/letsencrypt/ 2018-08-25T22:08:15+02:00 - - - - https://hagfi.sh/administration/mysql_tuner/ + + https://blog.hagfi.sh/administration/mysql_tuner/ 2018-08-25T22:08:15+02:00 - - - - https://hagfi.sh/administration/windows_troubleshooting/ + + https://blog.hagfi.sh/administration/windows_troubleshooting/ 2018-08-25T22:08:15+02:00 - - - - https://hagfi.sh/administration/dont-let-your-application-interfere-with-letsencrypt/ - 2018-08-23T22:46:41+02:00 - - - - https://hagfi.sh/development/vue-js/ - 2018-08-23T22:44:46+02:00 - - - - https://hagfi.sh/administration/luks-encryption/ + + https://blog.hagfi.sh/tags/disk/ 2018-08-23T22:08:15+02:00 - 0.1 - - - - https://hagfi.sh/administration/ - 2018-08-25T22:08:15+02:00 - 0 - - - - https://hagfi.sh/development/ - 2018-08-23T22:44:46+02:00 - 0 - - - - https://hagfi.sh/ - 2018-08-25T22:08:15+02:00 - 0 + + https://blog.hagfi.sh/tags/encryption/ + 2018-08-23T22:08:15+02:00 + + https://blog.hagfi.sh/administration/luks-encryption/ + 2018-08-23T22:08:15+02:00 + + https://blog.hagfi.sh/tags/partition/ + 2018-08-23T22:08:15+02:00 + + https://blog.hagfi.sh/index.json + 2017-03-05T21:10:52+01:00 - - \ No newline at end of file + diff --git a/public/tags/arch/index.html b/public/tags/arch/index.html new file mode 100644 index 0000000..d2d6965 --- /dev/null +++ b/public/tags/arch/index.html @@ -0,0 +1,279 @@ + + + + + arch // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Yet Another Arch Guide +

+
+
+ + + + +
+ +

+ +
+

Setting up Arch with other bells and whistles.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/arch/index.xml b/public/tags/arch/index.xml new file mode 100644 index 0000000..949f70e --- /dev/null +++ b/public/tags/arch/index.xml @@ -0,0 +1,20 @@ + + + + arch on Hagfi.sh + https://blog.hagfi.sh/tags/arch/ + Recent content in arch on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 30 Nov 2018 10:08:22 +0200 + + Yet Another Arch Guide + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + Fri, 30 Nov 2018 10:08:22 +0200 + + https://blog.hagfi.sh/administration/yet-another-arch-guide/ + <p>Setting up Arch with other bells and whistles.</p> + + + + diff --git a/public/tags/bash/index.html b/public/tags/bash/index.html new file mode 100644 index 0000000..4ccc64c --- /dev/null +++ b/public/tags/bash/index.html @@ -0,0 +1,281 @@ + + + + + bash // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Bash Tips & Tricks +

+
+
+ + + + + + +
+ +

+ +
+

Usefull bash tips & tricks

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/bash/index.xml b/public/tags/bash/index.xml new file mode 100644 index 0000000..2f2223c --- /dev/null +++ b/public/tags/bash/index.xml @@ -0,0 +1,20 @@ + + + + bash on Hagfi.sh + https://blog.hagfi.sh/tags/bash/ + Recent content in bash on Hagfi.sh + Hugo -- gohugo.io + en-us + Sun, 11 Nov 2018 16:01:15 +0100 + + Bash Tips & Tricks + https://blog.hagfi.sh/administration/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/administration/bash/ + <p>Usefull bash tips &amp; tricks</p> + + + + diff --git a/public/tags/boot/index.html b/public/tags/boot/index.html new file mode 100644 index 0000000..e197a62 --- /dev/null +++ b/public/tags/boot/index.html @@ -0,0 +1,279 @@ + + + + + boot // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Changing boot targets +

+
+
+ + + + +
+ +

+ +
+

Switch between run levels / environments.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/boot/index.xml b/public/tags/boot/index.xml new file mode 100644 index 0000000..42b6255 --- /dev/null +++ b/public/tags/boot/index.xml @@ -0,0 +1,20 @@ + + + + boot on Hagfi.sh + https://blog.hagfi.sh/tags/boot/ + Recent content in boot on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 09 Nov 2018 10:08:15 +0200 + + Changing boot targets + https://blog.hagfi.sh/administration/boot-targets/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/boot-targets/ + <p>Switch between run levels / environments.</p> + + + + diff --git a/public/tags/data/index.html b/public/tags/data/index.html new file mode 100644 index 0000000..cf96a02 --- /dev/null +++ b/public/tags/data/index.html @@ -0,0 +1,279 @@ + + + + + data // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Mount with automount (autofs) +

+
+
+ + + + +
+ +

+ +
+

Automagically mount remote directories on login.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/data/index.xml b/public/tags/data/index.xml new file mode 100644 index 0000000..32053b3 --- /dev/null +++ b/public/tags/data/index.xml @@ -0,0 +1,20 @@ + + + + data on Hagfi.sh + https://blog.hagfi.sh/tags/data/ + Recent content in data on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 09 Nov 2018 10:08:15 +0200 + + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + diff --git a/public/tags/directory/index.html b/public/tags/directory/index.html new file mode 100644 index 0000000..5edab60 --- /dev/null +++ b/public/tags/directory/index.html @@ -0,0 +1,321 @@ + + + + + directory // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Fatrace: Report system wide file access events +

+
+
+ + + + + + +
+ +

+ +
+

fatrace watches every file on server (except from itself and other kernel file systems).

+
+ + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/directory/index.xml b/public/tags/directory/index.xml new file mode 100644 index 0000000..896fb79 --- /dev/null +++ b/public/tags/directory/index.xml @@ -0,0 +1,29 @@ + + + + directory on Hagfi.sh + https://blog.hagfi.sh/tags/directory/ + Recent content in directory on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/tags/disk/index.html b/public/tags/disk/index.html new file mode 100644 index 0000000..c69be02 --- /dev/null +++ b/public/tags/disk/index.html @@ -0,0 +1,279 @@ + + + + + disk // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Luks Encryption +

+
+
+ + + + +
+ +

+ +
+

Create an encrypted partition that will automatically mount at boot.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/disk/index.xml b/public/tags/disk/index.xml new file mode 100644 index 0000000..f55eadd --- /dev/null +++ b/public/tags/disk/index.xml @@ -0,0 +1,20 @@ + + + + disk on Hagfi.sh + https://blog.hagfi.sh/tags/disk/ + Recent content in disk on Hagfi.sh + Hugo -- gohugo.io + en-us + Thu, 23 Aug 2018 22:08:15 +0200 + + Luks Encryption + https://blog.hagfi.sh/administration/luks-encryption/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> + + + + diff --git a/public/tags/du/index.html b/public/tags/du/index.html new file mode 100644 index 0000000..4e74160 --- /dev/null +++ b/public/tags/du/index.html @@ -0,0 +1,281 @@ + + + + + du // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/du/index.xml b/public/tags/du/index.xml new file mode 100644 index 0000000..386f79c --- /dev/null +++ b/public/tags/du/index.xml @@ -0,0 +1,20 @@ + + + + du on Hagfi.sh + https://blog.hagfi.sh/tags/du/ + Recent content in du on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 17 Sep 2018 22:18:38 +0200 + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/tags/encryption/index.html b/public/tags/encryption/index.html new file mode 100644 index 0000000..737dd70 --- /dev/null +++ b/public/tags/encryption/index.html @@ -0,0 +1,279 @@ + + + + + encryption // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Luks Encryption +

+
+
+ + + + +
+ +

+ +
+

Create an encrypted partition that will automatically mount at boot.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/encryption/index.xml b/public/tags/encryption/index.xml new file mode 100644 index 0000000..093bd95 --- /dev/null +++ b/public/tags/encryption/index.xml @@ -0,0 +1,20 @@ + + + + encryption on Hagfi.sh + https://blog.hagfi.sh/tags/encryption/ + Recent content in encryption on Hagfi.sh + Hugo -- gohugo.io + en-us + Thu, 23 Aug 2018 22:08:15 +0200 + + Luks Encryption + https://blog.hagfi.sh/administration/luks-encryption/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> + + + + diff --git a/public/tags/hugo/index.html b/public/tags/hugo/index.html new file mode 100644 index 0000000..9a91bb2 --- /dev/null +++ b/public/tags/hugo/index.html @@ -0,0 +1,280 @@ + + + + + hugo // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/hugo/index.xml b/public/tags/hugo/index.xml new file mode 100644 index 0000000..9f06dc1 --- /dev/null +++ b/public/tags/hugo/index.xml @@ -0,0 +1,21 @@ + + + + hugo on Hagfi.sh + https://blog.hagfi.sh/tags/hugo/ + Recent content in hugo on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/ifconfig/index.html b/public/tags/ifconfig/index.html new file mode 100644 index 0000000..d7cee7e --- /dev/null +++ b/public/tags/ifconfig/index.html @@ -0,0 +1,279 @@ + + + + + ifconfig // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Troubles with interfaces after a VM clone +

+
+
+ + + + +
+ +

+ +
+

Remapping interfaces and their MAC address.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/ifconfig/index.xml b/public/tags/ifconfig/index.xml new file mode 100644 index 0000000..d34cb7b --- /dev/null +++ b/public/tags/ifconfig/index.xml @@ -0,0 +1,20 @@ + + + + ifconfig on Hagfi.sh + https://blog.hagfi.sh/tags/ifconfig/ + Recent content in ifconfig on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + diff --git a/public/tags/index.html b/public/tags/index.html new file mode 100644 index 0000000..325f6d4 --- /dev/null +++ b/public/tags/index.html @@ -0,0 +1,995 @@ + + + + + Tags // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ arch +

+
+ + + + +
+ +
+
+ +

+ bash +

+
+ + + + +
+ +
+
+ +

+ script +

+
+ + + + +
+ +
+
+ +

+ boot +

+
+ + + + +
+ +
+
+ +

+ data +

+
+ + + + +
+ +
+
+ +

+ linux +

+
+ + + + +
+ +
+
+ +

+ mount +

+
+ + + + +
+ +
+
+ +

+ security +

+
+ + + + +
+ +
+
+ +

+ shares +

+
+ + + + +
+ +
+
+ +

+ directory +

+
+ + + + +
+ +
+
+ +

+ ifconfig +

+
+ + + + +
+ +
+
+ +

+ interfaces +

+
+ + + + +
+ +
+
+ +

+ inventory +

+
+ + + + +
+ +
+
+ +

+ network +

+
+ + + + +
+ +
+
+ +

+ networking +

+
+ + + + +
+ +
+
+ +

+ size +

+
+ + + + +
+ +
+
+ +

+ du +

+
+ + + + +
+ +
+
+ +

+ ncdu +

+
+ + + + +
+ +
+
+ +

+ hugo +

+
+ + + + +
+ +
+
+ +

+ javascript +

+
+ + + + +
+ +
+
+ +

+ js +

+
+ + + + +
+ +
+
+ +

+ json +

+
+ + + + +
+ +
+
+ +

+ prism +

+
+ + + + +
+ +
+
+ +

+ prismjs +

+
+ + + + +
+ +
+
+ +

+ vue +

+
+ + + + +
+ +
+
+ +

+ vuejs +

+
+ + + + +
+ +
+
+ +

+ disk +

+
+ + + + +
+ +
+
+ +

+ encryption +

+
+ + + + +
+ +
+
+ +

+ partition +

+
+ + + + +
+ +
+ + +
+
+ + + diff --git a/public/tags/index.xml b/public/tags/index.xml new file mode 100644 index 0000000..a1e077f --- /dev/null +++ b/public/tags/index.xml @@ -0,0 +1,272 @@ + + + + Tags on Hagfi.sh + https://blog.hagfi.sh/tags/ + Recent content in Tags on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 30 Nov 2018 10:08:22 +0200 + + arch + https://blog.hagfi.sh/tags/arch/ + Fri, 30 Nov 2018 10:08:22 +0200 + + https://blog.hagfi.sh/tags/arch/ + + + + + bash + https://blog.hagfi.sh/tags/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/tags/bash/ + + + + + script + https://blog.hagfi.sh/tags/script/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/tags/script/ + + + + + boot + https://blog.hagfi.sh/tags/boot/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/tags/boot/ + + + + + data + https://blog.hagfi.sh/tags/data/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/tags/data/ + + + + + linux + https://blog.hagfi.sh/tags/linux/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/tags/linux/ + + + + + mount + https://blog.hagfi.sh/tags/mount/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/tags/mount/ + + + + + security + https://blog.hagfi.sh/tags/security/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/tags/security/ + + + + + shares + https://blog.hagfi.sh/tags/shares/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/tags/shares/ + + + + + directory + https://blog.hagfi.sh/tags/directory/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/directory/ + + + + + ifconfig + https://blog.hagfi.sh/tags/ifconfig/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/ifconfig/ + + + + + interfaces + https://blog.hagfi.sh/tags/interfaces/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/interfaces/ + + + + + inventory + https://blog.hagfi.sh/tags/inventory/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/inventory/ + + + + + network + https://blog.hagfi.sh/tags/network/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/network/ + + + + + networking + https://blog.hagfi.sh/tags/networking/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/networking/ + + + + + size + https://blog.hagfi.sh/tags/size/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tags/size/ + + + + + du + https://blog.hagfi.sh/tags/du/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tags/du/ + + + + + ncdu + https://blog.hagfi.sh/tags/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tags/ncdu/ + + + + + hugo + https://blog.hagfi.sh/tags/hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/hugo/ + + + + + javascript + https://blog.hagfi.sh/tags/javascript/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/javascript/ + + + + + js + https://blog.hagfi.sh/tags/js/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/js/ + + + + + json + https://blog.hagfi.sh/tags/json/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/json/ + + + + + prism + https://blog.hagfi.sh/tags/prism/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/prism/ + + + + + prismjs + https://blog.hagfi.sh/tags/prismjs/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/prismjs/ + + + + + vue + https://blog.hagfi.sh/tags/vue/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/vue/ + + + + + vuejs + https://blog.hagfi.sh/tags/vuejs/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/tags/vuejs/ + + + + + disk + https://blog.hagfi.sh/tags/disk/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/tags/disk/ + + + + + encryption + https://blog.hagfi.sh/tags/encryption/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/tags/encryption/ + + + + + partition + https://blog.hagfi.sh/tags/partition/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/tags/partition/ + + + + + diff --git a/public/tags/interfaces/index.html b/public/tags/interfaces/index.html new file mode 100644 index 0000000..6cebffe --- /dev/null +++ b/public/tags/interfaces/index.html @@ -0,0 +1,279 @@ + + + + + interfaces // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Troubles with interfaces after a VM clone +

+
+
+ + + + +
+ +

+ +
+

Remapping interfaces and their MAC address.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/interfaces/index.xml b/public/tags/interfaces/index.xml new file mode 100644 index 0000000..ad5f5c0 --- /dev/null +++ b/public/tags/interfaces/index.xml @@ -0,0 +1,20 @@ + + + + interfaces on Hagfi.sh + https://blog.hagfi.sh/tags/interfaces/ + Recent content in interfaces on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + diff --git a/public/tags/inventory/index.html b/public/tags/inventory/index.html new file mode 100644 index 0000000..ec1b9ed --- /dev/null +++ b/public/tags/inventory/index.html @@ -0,0 +1,321 @@ + + + + + inventory // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Fatrace: Report system wide file access events +

+
+
+ + + + + + +
+ +

+ +
+

fatrace watches every file on server (except from itself and other kernel file systems).

+
+ + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/inventory/index.xml b/public/tags/inventory/index.xml new file mode 100644 index 0000000..f152860 --- /dev/null +++ b/public/tags/inventory/index.xml @@ -0,0 +1,29 @@ + + + + inventory on Hagfi.sh + https://blog.hagfi.sh/tags/inventory/ + Recent content in inventory on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/tags/javascript/index.html b/public/tags/javascript/index.html new file mode 100644 index 0000000..648eb2f --- /dev/null +++ b/public/tags/javascript/index.html @@ -0,0 +1,280 @@ + + + + + javascript // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/javascript/index.xml b/public/tags/javascript/index.xml new file mode 100644 index 0000000..2894cd4 --- /dev/null +++ b/public/tags/javascript/index.xml @@ -0,0 +1,21 @@ + + + + javascript on Hagfi.sh + https://blog.hagfi.sh/tags/javascript/ + Recent content in javascript on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/js/index.html b/public/tags/js/index.html new file mode 100644 index 0000000..4e33d82 --- /dev/null +++ b/public/tags/js/index.html @@ -0,0 +1,280 @@ + + + + + js // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/js/index.xml b/public/tags/js/index.xml new file mode 100644 index 0000000..f19fbe8 --- /dev/null +++ b/public/tags/js/index.xml @@ -0,0 +1,21 @@ + + + + js on Hagfi.sh + https://blog.hagfi.sh/tags/js/ + Recent content in js on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/json/index.html b/public/tags/json/index.html new file mode 100644 index 0000000..7f63f25 --- /dev/null +++ b/public/tags/json/index.html @@ -0,0 +1,280 @@ + + + + + json // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/json/index.xml b/public/tags/json/index.xml new file mode 100644 index 0000000..e21fd5a --- /dev/null +++ b/public/tags/json/index.xml @@ -0,0 +1,21 @@ + + + + json on Hagfi.sh + https://blog.hagfi.sh/tags/json/ + Recent content in json on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/linux/index.html b/public/tags/linux/index.html new file mode 100644 index 0000000..ca1286d --- /dev/null +++ b/public/tags/linux/index.html @@ -0,0 +1,317 @@ + + + + + linux // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Changing boot targets +

+
+
+ + + + +
+ +

+ +
+

Switch between run levels / environments.

+
+ + +
+ +
+
+ +

+ Mount with automount (autofs) +

+
+
+ + + + +
+ +

+ +
+

Automagically mount remote directories on login.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/linux/index.xml b/public/tags/linux/index.xml new file mode 100644 index 0000000..d3b5e5e --- /dev/null +++ b/public/tags/linux/index.xml @@ -0,0 +1,29 @@ + + + + linux on Hagfi.sh + https://blog.hagfi.sh/tags/linux/ + Recent content in linux on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 09 Nov 2018 10:08:15 +0200 + + Changing boot targets + https://blog.hagfi.sh/administration/boot-targets/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/boot-targets/ + <p>Switch between run levels / environments.</p> + + + + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + diff --git a/public/tags/mount/index.html b/public/tags/mount/index.html new file mode 100644 index 0000000..5f39358 --- /dev/null +++ b/public/tags/mount/index.html @@ -0,0 +1,279 @@ + + + + + mount // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Mount with automount (autofs) +

+
+
+ + + + +
+ +

+ +
+

Automagically mount remote directories on login.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/mount/index.xml b/public/tags/mount/index.xml new file mode 100644 index 0000000..d9f6ab2 --- /dev/null +++ b/public/tags/mount/index.xml @@ -0,0 +1,20 @@ + + + + mount on Hagfi.sh + https://blog.hagfi.sh/tags/mount/ + Recent content in mount on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 09 Nov 2018 10:08:15 +0200 + + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + diff --git a/public/tags/ncdu/index.html b/public/tags/ncdu/index.html new file mode 100644 index 0000000..8714ffb --- /dev/null +++ b/public/tags/ncdu/index.html @@ -0,0 +1,281 @@ + + + + + ncdu // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/ncdu/index.xml b/public/tags/ncdu/index.xml new file mode 100644 index 0000000..0070304 --- /dev/null +++ b/public/tags/ncdu/index.xml @@ -0,0 +1,20 @@ + + + + ncdu on Hagfi.sh + https://blog.hagfi.sh/tags/ncdu/ + Recent content in ncdu on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 17 Sep 2018 22:18:38 +0200 + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/tags/network/index.html b/public/tags/network/index.html new file mode 100644 index 0000000..2f03815 --- /dev/null +++ b/public/tags/network/index.html @@ -0,0 +1,279 @@ + + + + + network // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Troubles with interfaces after a VM clone +

+
+
+ + + + +
+ +

+ +
+

Remapping interfaces and their MAC address.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/network/index.xml b/public/tags/network/index.xml new file mode 100644 index 0000000..0ad9aa7 --- /dev/null +++ b/public/tags/network/index.xml @@ -0,0 +1,20 @@ + + + + network on Hagfi.sh + https://blog.hagfi.sh/tags/network/ + Recent content in network on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + diff --git a/public/tags/networking/index.html b/public/tags/networking/index.html new file mode 100644 index 0000000..119f9a3 --- /dev/null +++ b/public/tags/networking/index.html @@ -0,0 +1,279 @@ + + + + + networking // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Troubles with interfaces after a VM clone +

+
+
+ + + + +
+ +

+ +
+

Remapping interfaces and their MAC address.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/networking/index.xml b/public/tags/networking/index.xml new file mode 100644 index 0000000..4e8f434 --- /dev/null +++ b/public/tags/networking/index.xml @@ -0,0 +1,20 @@ + + + + networking on Hagfi.sh + https://blog.hagfi.sh/tags/networking/ + Recent content in networking on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Troubles with interfaces after a VM clone + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/administration/toubles-with-interfaces-after-clone/ + <p>Remapping interfaces and their MAC address.</p> + + + + diff --git a/public/tags/partition/index.html b/public/tags/partition/index.html new file mode 100644 index 0000000..d3eae3a --- /dev/null +++ b/public/tags/partition/index.html @@ -0,0 +1,279 @@ + + + + + partition // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Luks Encryption +

+
+
+ + + + +
+ +

+ +
+

Create an encrypted partition that will automatically mount at boot.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/partition/index.xml b/public/tags/partition/index.xml new file mode 100644 index 0000000..614cee6 --- /dev/null +++ b/public/tags/partition/index.xml @@ -0,0 +1,20 @@ + + + + partition on Hagfi.sh + https://blog.hagfi.sh/tags/partition/ + Recent content in partition on Hagfi.sh + Hugo -- gohugo.io + en-us + Thu, 23 Aug 2018 22:08:15 +0200 + + Luks Encryption + https://blog.hagfi.sh/administration/luks-encryption/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> + + + + diff --git a/public/tags/prism/index.html b/public/tags/prism/index.html new file mode 100644 index 0000000..823f12f --- /dev/null +++ b/public/tags/prism/index.html @@ -0,0 +1,280 @@ + + + + + prism // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/prism/index.xml b/public/tags/prism/index.xml new file mode 100644 index 0000000..e291c91 --- /dev/null +++ b/public/tags/prism/index.xml @@ -0,0 +1,21 @@ + + + + prism on Hagfi.sh + https://blog.hagfi.sh/tags/prism/ + Recent content in prism on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/prismjs/index.html b/public/tags/prismjs/index.html new file mode 100644 index 0000000..7fdf108 --- /dev/null +++ b/public/tags/prismjs/index.html @@ -0,0 +1,280 @@ + + + + + prismjs // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/prismjs/index.xml b/public/tags/prismjs/index.xml new file mode 100644 index 0000000..6236109 --- /dev/null +++ b/public/tags/prismjs/index.xml @@ -0,0 +1,21 @@ + + + + prismjs on Hagfi.sh + https://blog.hagfi.sh/tags/prismjs/ + Recent content in prismjs on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/script/index.html b/public/tags/script/index.html new file mode 100644 index 0000000..0124067 --- /dev/null +++ b/public/tags/script/index.html @@ -0,0 +1,281 @@ + + + + + script // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Bash Tips & Tricks +

+
+
+ + + + + + +
+ +

+ +
+

Usefull bash tips & tricks

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/script/index.xml b/public/tags/script/index.xml new file mode 100644 index 0000000..8235393 --- /dev/null +++ b/public/tags/script/index.xml @@ -0,0 +1,20 @@ + + + + script on Hagfi.sh + https://blog.hagfi.sh/tags/script/ + Recent content in script on Hagfi.sh + Hugo -- gohugo.io + en-us + Sun, 11 Nov 2018 16:01:15 +0100 + + Bash Tips & Tricks + https://blog.hagfi.sh/administration/bash/ + Sun, 11 Nov 2018 16:01:15 +0100 + + https://blog.hagfi.sh/administration/bash/ + <p>Usefull bash tips &amp; tricks</p> + + + + diff --git a/public/tags/security/index.html b/public/tags/security/index.html new file mode 100644 index 0000000..4d302a0 --- /dev/null +++ b/public/tags/security/index.html @@ -0,0 +1,317 @@ + + + + + security // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Changing boot targets +

+
+
+ + + + +
+ +

+ +
+

Switch between run levels / environments.

+
+ + +
+ +
+
+ +

+ Luks Encryption +

+
+
+ + + + +
+ +

+ +
+

Create an encrypted partition that will automatically mount at boot.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/security/index.xml b/public/tags/security/index.xml new file mode 100644 index 0000000..c3afb15 --- /dev/null +++ b/public/tags/security/index.xml @@ -0,0 +1,29 @@ + + + + security on Hagfi.sh + https://blog.hagfi.sh/tags/security/ + Recent content in security on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 09 Nov 2018 10:08:15 +0200 + + Changing boot targets + https://blog.hagfi.sh/administration/boot-targets/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/boot-targets/ + <p>Switch between run levels / environments.</p> + + + + Luks Encryption + https://blog.hagfi.sh/administration/luks-encryption/ + Thu, 23 Aug 2018 22:08:15 +0200 + + https://blog.hagfi.sh/administration/luks-encryption/ + <p>Create an encrypted partition that will automatically mount at boot.</p> + + + + diff --git a/public/tags/shares/index.html b/public/tags/shares/index.html new file mode 100644 index 0000000..15aab30 --- /dev/null +++ b/public/tags/shares/index.html @@ -0,0 +1,279 @@ + + + + + shares // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Mount with automount (autofs) +

+
+
+ + + + +
+ +

+ +
+

Automagically mount remote directories on login.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/shares/index.xml b/public/tags/shares/index.xml new file mode 100644 index 0000000..12afbd5 --- /dev/null +++ b/public/tags/shares/index.xml @@ -0,0 +1,20 @@ + + + + shares on Hagfi.sh + https://blog.hagfi.sh/tags/shares/ + Recent content in shares on Hagfi.sh + Hugo -- gohugo.io + en-us + Fri, 09 Nov 2018 10:08:15 +0200 + + Mount with automount (autofs) + https://blog.hagfi.sh/administration/autofs/ + Fri, 09 Nov 2018 10:08:15 +0200 + + https://blog.hagfi.sh/administration/autofs/ + <p>Automagically mount remote directories on login.</p> + + + + diff --git a/public/tags/size/index.html b/public/tags/size/index.html new file mode 100644 index 0000000..e37c0ba --- /dev/null +++ b/public/tags/size/index.html @@ -0,0 +1,321 @@ + + + + + size // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Fatrace: Report system wide file access events +

+
+
+ + + + + + +
+ +

+ +
+

fatrace watches every file on server (except from itself and other kernel file systems).

+
+ + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/size/index.xml b/public/tags/size/index.xml new file mode 100644 index 0000000..30f490c --- /dev/null +++ b/public/tags/size/index.xml @@ -0,0 +1,29 @@ + + + + size on Hagfi.sh + https://blog.hagfi.sh/tags/size/ + Recent content in size on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/tags/vue/index.html b/public/tags/vue/index.html new file mode 100644 index 0000000..0979545 --- /dev/null +++ b/public/tags/vue/index.html @@ -0,0 +1,280 @@ + + + + + vue // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/vue/index.xml b/public/tags/vue/index.xml new file mode 100644 index 0000000..60a1717 --- /dev/null +++ b/public/tags/vue/index.xml @@ -0,0 +1,21 @@ + + + + vue on Hagfi.sh + https://blog.hagfi.sh/tags/vue/ + Recent content in vue on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tags/vuejs/index.html b/public/tags/vuejs/index.html new file mode 100644 index 0000000..328205a --- /dev/null +++ b/public/tags/vuejs/index.html @@ -0,0 +1,280 @@ + + + + + vuejs // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Live Search With HUGO +

+
+
+ + + + +
+ +

+ +
+

HUGO is static, that’s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that’s why I wanted a fast and fuzzy search implementation.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tags/vuejs/index.xml b/public/tags/vuejs/index.xml new file mode 100644 index 0000000..299d981 --- /dev/null +++ b/public/tags/vuejs/index.xml @@ -0,0 +1,21 @@ + + + + vuejs on Hagfi.sh + https://blog.hagfi.sh/tags/vuejs/ + Recent content in vuejs on Hagfi.sh + Hugo -- gohugo.io + en-us + Wed, 29 Aug 2018 22:44:46 +0200 + + Live Search With HUGO + https://blog.hagfi.sh/development/live-search-with-hugo/ + Wed, 29 Aug 2018 22:44:46 +0200 + + https://blog.hagfi.sh/development/live-search-with-hugo/ + <p>HUGO is static, that&rsquo;s a fact. How can I implement a live search? Searching the internet provided me only solutions +that require a page refresh, this time of age performance is key, so that&rsquo;s why I wanted a fast and fuzzy search implementation.</p> + + + + diff --git a/public/tools/fatrace/index.html b/public/tools/fatrace/index.html new file mode 100644 index 0000000..3a5d089 --- /dev/null +++ b/public/tools/fatrace/index.html @@ -0,0 +1,439 @@ + + + + + Fatrace: Report system wide file access events // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+ Contents + +
+ + +
+

+ Fatrace: Report system wide file access events +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + +

fatrace watches every file on server (except from itself and other kernel file systems).

+

fatrace watches every file on server (except from itself and other kernel file systems).

+

Install on Centos7

+

Download the repo file from fedorainfracloud.org

+
sudo curl https://copr.fedorainfracloud.org/coprs/ifas/fatrace/repo/epel-7/ifas-fatrace-epel-7.repo > /etc/yum.repos.d/ifas.repo
+sudo yum install fatrace -y
+

Usage

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
OptionDescription
-c, –current-mountOnly record events on partition/mount of current directory. Without this option, all (real) partitions/mount points are being watched.
-o FILE, –output=FILEWrite events to given file instead of standard output.
-s SECONDS, –seconds=SECONDSStop after the given number of seconds.
-t, –timestampAdd timestamp to events. When this option is given once, the format will be a humanreadable
-p PID, –ignore-pid=PIDIgnore events for this process ID. Can be specified multiple times.
+

Output

+

The output should look something like the following. My action was reloading this page while watching with fatrace.

+
$ fatrace -t
+12:58:20.859174 pickup(7666): CO /var/spool/postfix/maildrop
+12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace
+12:58:21.017572 caddy(7472): CO /var/www/vhosts/blog/tools/fatrace/index.html
+12:58:21.017572 caddy(7472): W /var/log/caddy/blog.log
+12:58:21.213908 caddy(7472): CO /var/www/vhosts/blog/index.json
+12:58:21.213908 caddy(7472): W /var/log/caddy/blog.log
+12:58:21.305848 caddy(7472): RCO /var/www/vhosts/blog/img/favicon.png
+12:58:21.305848 caddy(7472): W /var/log/caddy/blog.log
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
LetterDescription
RRead
WWrite
OOpen
CClose
+

Action identifiers can be combined

+

Usecases

+

identifying which files are accessed by a process.

+

References

+

Manpage fatrace

+ + + + +
+ Tags// + + , + + , + + , + +
+ + + +
+ More Reading + + + + + + + +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/public/tools/index.html b/public/tools/index.html new file mode 100644 index 0000000..1fa2986 --- /dev/null +++ b/public/tools/index.html @@ -0,0 +1,321 @@ + + + + + Tools // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ +
+
+ +

+ Fatrace: Report system wide file access events +

+
+
+ + + + + + +
+ +

+ +
+

fatrace watches every file on server (except from itself and other kernel file systems).

+
+ + +
+ +
+
+ +

+ NCDU: NCurses Disk Usage +

+
+
+ + + + + + +
+ +

+ +
+

ncdu is a command line tool to scan and calculate directory and file sizes.

+
+ + +
+ +
+ + +
+
+ + + diff --git a/public/tools/index.xml b/public/tools/index.xml new file mode 100644 index 0000000..f0876de --- /dev/null +++ b/public/tools/index.xml @@ -0,0 +1,29 @@ + + + + Tools on Hagfi.sh + https://blog.hagfi.sh/tools/ + Recent content in Tools on Hagfi.sh + Hugo -- gohugo.io + en-us + Mon, 05 Nov 2018 22:13:49 +0200 + + Fatrace: Report system wide file access events + https://blog.hagfi.sh/tools/fatrace/ + Mon, 05 Nov 2018 22:13:49 +0200 + + https://blog.hagfi.sh/tools/fatrace/ + <p>fatrace watches every file on server (except from itself and other kernel file systems).</p> + + + + NCDU: NCurses Disk Usage + https://blog.hagfi.sh/tools/ncdu/ + Mon, 17 Sep 2018 22:18:38 +0200 + + https://blog.hagfi.sh/tools/ncdu/ + <p>ncdu is a command line tool to scan and calculate directory and file sizes.</p> + + + + diff --git a/public/tools/ncdu/index.html b/public/tools/ncdu/index.html new file mode 100644 index 0000000..7a9d2e0 --- /dev/null +++ b/public/tools/ncdu/index.html @@ -0,0 +1,483 @@ + + + + + NCDU: NCurses Disk Usage // Hagfi.sh + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + + + +
+

+ NCDU: NCurses Disk Usage +

+

+ +

+ + + + + + + + + + + + + + + + +
+ + + + + +
+ + + + + + +

ncdu is a command line tool to scan and calculate directory and file sizes.

+

Comparison with ‘du’

+

While the initial scan is about the same as du, ncdu keeps the results in memory. This +can become handy when investigating the storage hog. You can compare the already cached +results immediately with a (r) escan.

+

Also navigation is a breese. ncdu creates a interactive session where the arrow keys are +used to open and close directories.

+

Options

+

ncdu is not bloated with options, but each of these are useful and easy to remember. All these are +used inside the interactive session.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyDescription
up, kMove cursor up
down, jMove cursor down
right/enterOpen selected directory
left, <, hOpen parent directory
nSort by name
sSort by size
CSort by items
dDelete selected file or directory
tToggle dirs before files when sorting
gShow percentage and/or graph
aToggle between apparent size and disk usage
cToggle display of child item counts
eShow/hide hidden or excluded files
iShow information about selected item
rRecalculate the current directory
bSpawn shell in current directory
qQuit ncdu
+

Advanced ncdu

+

JSON for development

+
ncdu -x / -o- | jq
+
+
+
    +
  • -x chose directory ‘/’
  • +
  • -o- output to stdout
  • +
+

Will create a JSON object of the current directory and all his subdirectories. This can come +handy for developing or generating reports.

+

Store result

+
ncdu -0xo- / | gzip > scan.gz
+
+
+
    +
  • -0 surpress unwanted output
  • +
  • -x chose directory ‘/’
  • +
  • -o- output to stdout
  • +
+

Use stored result

+
zcat scan.gz | ncdu -f-
+
+
+
    +
  • -f read from stdin
  • +
+

Author

+

Official Website

+ + + + +
+ Tags// + + , + + , + + , + + , + + , + +
+ + + +
+ More Reading + +
+ Newer// + Live Search With HUGO +
+ + + + + +
+ +
+ +
+ + +comments powered by Disqus + + + +
+
+ + + + + + + diff --git a/themes/redlounge/static/css/redlounge.css b/themes/redlounge/static/css/redlounge.css index 27ad51d..9d863cd 100644 --- a/themes/redlounge/static/css/redlounge.css +++ b/themes/redlounge/static/css/redlounge.css @@ -121,7 +121,6 @@ h2.brand-tagline { .nav-item { display: inline-block; *display: inline; - zoom: 1; } .nav-item a { background: transparent;