Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Site: v2.0 based on my own fork of the docDock theme (DocDockDoc) (#2)
* Site: Switch to my own fork of the docDock theme (DocDockDoc)
* Sys/Win: Link the attachments
* Sys/Win: We don't need a 'God mod' shortcut
* Ref/Git: Highlight configs as INI
* Ref/Git: Add fp alias for safely force-pushing
* Format git info date
  • Loading branch information
baltpeter committed Feb 6, 2021
1 parent e00d4b1 commit 379a0fe
Show file tree
Hide file tree
Showing 17 changed files with 113 additions and 63 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
@@ -1,3 +1,3 @@
[submodule "themes/docdock"]
path = themes/docdock
url = https://github.com/vjeantet/hugo-theme-docdock.git
[submodule "themes/docdockdoc"]
path = themes/docdockdoc
url = https://github.com/baltpeter/hugo-theme-docdockdoc.git
13 changes: 4 additions & 9 deletions config.toml
@@ -1,7 +1,6 @@
languageCode = "en-us"
title = "docs.benjamin-altpeter.de"
# TODO: I am not to happy with that theme. It looks quite nice but is way too heavy and not at all responsive…
theme = "docdock"
theme = "docdockdoc"
pygmentsCodeFences = true
pygmentsCodeFencesGuessSyntax = true
pygmentsUseClasses = true
Expand All @@ -17,15 +16,11 @@ email = "hi@bn.al"
[params]
editURL = "https://github.com/baltpeter/docs/edit/master/content/"
historyURL = "https://github.com/baltpeter/docs/commits/master/content/"
showVisitedLinks = false
themeStyle = "original"
themeVariant = "blue"
ordersectionsby = "weight"
disableHomeIcon = true
disableSearch = false
disableNavChevron = true
highlightClientSide = false
menushortcutsnewtab = false

[markup.goldmark.renderer]
unsafe = true

[outputs]
home = [ "HTML", "RSS", "JSON"]
Expand Down
10 changes: 1 addition & 9 deletions content/_index.md
Expand Up @@ -2,14 +2,6 @@
title: Home
---

# Welcome

Welcome to docs.benjamin-altpeter.de. This website is generated from the [baltpeter/docs](https://github.com/baltpeter/docs) repository on GitHub, where I keep my personal docs archive for various topics.

As these docs are mostly kept for myself, some may seem a little rough or lacking details. I still think that publishing this archive can be useful for others. If you think an entry can be improved, please feel free to submit your pull request! Every entry contains an 'Improve this page' link at the top that let you directly edit it on GitHub.

## TODO

* Fork the [DocDock theme](https://docdock.netlify.com): It does look nice and provides a good starting point but I do have some issues with it:
- It is not responsive **at all**.
- It is way too bloated. I really don't need Bootstrap, Font Awesome or jQuery. And there is probably quite a bit more to strip out…
As these docs are mostly kept for myself, some may seem a little rough or lacking details. I still think that publishing this archive can be useful for others. If you think an entry can be improved, please feel free to submit your pull request! Every entry contains an 'Edit on GitHub' link at the top that lets you directly edit it on GitHub.
8 changes: 5 additions & 3 deletions content/reference/git.md
Expand Up @@ -4,7 +4,7 @@ title: Git

## Aliases

```
```ini
[alias]
# See below, depends on the system.
# fixup = …
Expand All @@ -20,6 +20,8 @@ title: Git
r = rebase
rc = rebase --continue
ra = rebase --abort
# Only force-push if remote hasn't diverged, taken from: https://thoughtbot.com/blog/git-push-force-with-lease
fp = push --force-with-lease
# Checkout a GitHub PR, taken from: https://github.com/lee-dohm/dotfiles/blob/8d3c59004154571578c2b32df2cdebb013517630/gitconfig#L8, see: https://github.community/t5/How-to-use-Git-and-GitHub/Checkout-a-branch-from-a-fork/td-p/77
copr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
Expand Down Expand Up @@ -81,15 +83,15 @@ Simply make the desired changes, add them using `git add` and run `git fixup [re

The alias needs to be added to `~/.gitconfig`:

```
```ini
[alias]
# Taken from: https://blog.filippo.io/git-fixup-amending-an-older-commit/ (2019-06-22)
fixup = "!f() { TARGET=$(git rev-parse "$1"); git commit --fixup=$TARGET ${@:2} && EDITOR=true git rebase -i --autostash --autosquash $TARGET^; }; f"
```

This version however unfortunately doesn't work on Ubuntu because they use the *dash* shell as `/bin/sh` (which doesn't support the `${@:2}` expansion). There, you can instead use this simplified version that doesn't support passing additional arguments:

```
```ini
[alias]
# Adapted after: https://blog.filippo.io/git-fixup-amending-an-older-commit/ (2019-06-22)
# I had to remove the `${@:2}` after `commit` which would have forwarded all remaining args to `commit`
Expand Down
12 changes: 5 additions & 7 deletions content/systems/windows/_index.md
Expand Up @@ -4,11 +4,11 @@ title: Windows 10

## Install common software

First, install [Chocolatey](https://chocolatey.org/install). Then run `choco feature enable -n allowGlobalConfirmation` to disable prompting for every package. Finally, install the default packages using `choco install packages.config` (optionally also install the additional packages from `packages-additional.config`) in an admin `cmd`.
First, install [Chocolatey](https://chocolatey.org/install). Then run `choco feature enable -n allowGlobalConfirmation` to disable prompting for every package. Finally, install the default packages using [`choco install packages.config`](files/packages.config) (optionally also install the additional packages from [`packages-additional.config`](files/packages-additional.config)) in an admin `cmd`.

## Uninstall bloatware

In an elevated command prompt, run `@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/baltpeter/docs/master/content/systems/windows/uninstall-bloatware.ps1'))"`.
In an elevated command prompt, run `@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/baltpeter/docs/master/content/systems/windows/files/uninstall-bloatware.ps1'))"`.

## Privacy settings

Expand All @@ -20,14 +20,12 @@ Apply the recommended settings from [O&O ShutUp 10](https://www.oo-software.com/
* Go into Windows Explorer and *View* -> *Options*. In the first tab, under *Privacy*, uncheck all settings.
In the *View* tab, enable 'Show hidden files, folders and drives' and disable 'Hide extensions for known types', 'Show sync provider notifications' and 'Hide protected operating system files (recommended)'.
-->
* Run the `tweaks.reg` file to import the settings into the registry.
* Run the [`tweaks.reg`](files/tweaks.reg) file to import the settings into the registry.
* Go to the *Personalisation* -> *Start* settings page (`ms-settings:personalization-start`) and disable all options apart from 'Show app list in start menu'.
* Go to the *Devices* -> *Pen & Windows Ink* settings page (`ms-settings:pen`) and disable 'Show recommend app suggestions'.

## Misc.

* Create a 'god mode' shortcut: On the desktop, create a new folder and name it `God Mode.{ED7BA470-8E54-465E-825C-99712043E01C}`.

## References:

* https://www.tweakhound.com/2015/12/09/tweaking-windows-10

{{< attachments />}}
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion layouts/partials/custom-content-footer.html
Expand Up @@ -3,7 +3,7 @@
<div style="float: left;">
Last change to this page: <a href="https://github.com/baltpeter/docs/commit/{{ .Hash }}">“{{ .Subject }}”</a>
(<code>{{ .AbbreviatedHash }}</code>)
<br>by <em>{{ .AuthorName }}</em> at {{ $.Lastmod }}
<br>by <em>{{ .AuthorName }}</em> at {{ $.Lastmod.Format "2006-01-02T15:04:05 MST" }}
{{ if $.Site.Params.historyURL }}
<a href="{{ $.Site.Params.historyURL }}{{ replace $.File.Dir "\\" "/" }}{{ $.File.LogicalName }}"
target="blank">(view history)</a>
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/custom-head.html
@@ -1,2 +1,3 @@
<link rel="stylesheet" href="{{ "custom.css" | absURL }}">
<link rel="stylesheet" href="{{ "syntax.css" | absURL }}">
<link rel="stylesheet" href="{{ "syntax.css" | absURL }}" media="screen">
<link rel="stylesheet" href="{{ "syntax-print.css" | absURL }}" media="print">
9 changes: 9 additions & 0 deletions netlify.toml
@@ -1,3 +1,12 @@
[build]
publish = "public"
command = "./deploy.sh"

[context.production.environment]
HUGO_VERSION = "0.73.0"

[context.deploy-preview.environment]
HUGO_VERSION = "0.73.0"

[context.branch-deploy.environment]
HUGO_VERSION = "0.73.0"
29 changes: 0 additions & 29 deletions static/custom.css
@@ -1,36 +1,7 @@
h1,
h2,
h3,
h4,
h5,
h6 {
text-transform: none;
}

code {
white-space: pre-wrap;
}

#body-inner {
max-width: 960px;
margin: auto;
}

#sidebar {
width: 350px;
}
#sidebar ul li div a {
width: 100%;
}

section#shortcuts {
margin-top: 50px;
}

footer > div {
margin-top: 10px;
}

.rm-10 {
margin-right: 10px;
}
82 changes: 82 additions & 0 deletions static/syntax-print.css
@@ -0,0 +1,82 @@
/* Background */ .chroma { }
/* Other */ .chroma .x { }
/* Error */ .chroma .err { }
/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; }
/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; }
/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc }
/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f }
/* Keyword */ .chroma .k { color: #008000; font-weight: bold }
/* KeywordConstant */ .chroma .kc { color: #008000; font-weight: bold }
/* KeywordDeclaration */ .chroma .kd { color: #008000; font-weight: bold }
/* KeywordNamespace */ .chroma .kn { color: #008000; font-weight: bold }
/* KeywordPseudo */ .chroma .kp { color: #008000 }
/* KeywordReserved */ .chroma .kr { color: #008000; font-weight: bold }
/* KeywordType */ .chroma .kt { color: #b00040 }
/* Name */ .chroma .n { }
/* NameAttribute */ .chroma .na { color: #7d9029 }
/* NameBuiltin */ .chroma .nb { color: #008000 }
/* NameBuiltinPseudo */ .chroma .bp { }
/* NameClass */ .chroma .nc { color: #0000ff; font-weight: bold }
/* NameConstant */ .chroma .no { color: #880000 }
/* NameDecorator */ .chroma .nd { color: #aa22ff }
/* NameEntity */ .chroma .ni { color: #999999; font-weight: bold }
/* NameException */ .chroma .ne { color: #d2413a; font-weight: bold }
/* NameFunction */ .chroma .nf { color: #0000ff }
/* NameFunctionMagic */ .chroma .fm { }
/* NameLabel */ .chroma .nl { color: #a0a000 }
/* NameNamespace */ .chroma .nn { color: #0000ff; font-weight: bold }
/* NameOther */ .chroma .nx { }
/* NameProperty */ .chroma .py { }
/* NameTag */ .chroma .nt { color: #008000; font-weight: bold }
/* NameVariable */ .chroma .nv { color: #19177c }
/* NameVariableClass */ .chroma .vc { }
/* NameVariableGlobal */ .chroma .vg { }
/* NameVariableInstance */ .chroma .vi { }
/* NameVariableMagic */ .chroma .vm { }
/* Literal */ .chroma .l { }
/* LiteralDate */ .chroma .ld { }
/* LiteralString */ .chroma .s { color: #ba2121 }
/* LiteralStringAffix */ .chroma .sa { color: #ba2121 }
/* LiteralStringBacktick */ .chroma .sb { color: #ba2121 }
/* LiteralStringChar */ .chroma .sc { color: #ba2121 }
/* LiteralStringDelimiter */ .chroma .dl { color: #ba2121 }
/* LiteralStringDoc */ .chroma .sd { color: #ba2121; font-style: italic }
/* LiteralStringDouble */ .chroma .s2 { color: #ba2121 }
/* LiteralStringEscape */ .chroma .se { color: #bb6622; font-weight: bold }
/* LiteralStringHeredoc */ .chroma .sh { color: #ba2121 }
/* LiteralStringInterpol */ .chroma .si { color: #bb6688; font-weight: bold }
/* LiteralStringOther */ .chroma .sx { color: #008000 }
/* LiteralStringRegex */ .chroma .sr { color: #bb6688 }
/* LiteralStringSingle */ .chroma .s1 { color: #ba2121 }
/* LiteralStringSymbol */ .chroma .ss { color: #19177c }
/* LiteralNumber */ .chroma .m { color: #666666 }
/* LiteralNumberBin */ .chroma .mb { color: #666666 }
/* LiteralNumberFloat */ .chroma .mf { color: #666666 }
/* LiteralNumberHex */ .chroma .mh { color: #666666 }
/* LiteralNumberInteger */ .chroma .mi { color: #666666 }
/* LiteralNumberIntegerLong */ .chroma .il { color: #666666 }
/* LiteralNumberOct */ .chroma .mo { color: #666666 }
/* Operator */ .chroma .o { color: #666666 }
/* OperatorWord */ .chroma .ow { color: #aa22ff; font-weight: bold }
/* Punctuation */ .chroma .p { }
/* Comment */ .chroma .c { color: #408080; font-style: italic }
/* CommentHashbang */ .chroma .ch { color: #408080; font-style: italic }
/* CommentMultiline */ .chroma .cm { color: #408080; font-style: italic }
/* CommentSingle */ .chroma .c1 { color: #408080; font-style: italic }
/* CommentSpecial */ .chroma .cs { color: #408080; font-style: italic }
/* CommentPreproc */ .chroma .cp { color: #bc7a00 }
/* CommentPreprocFile */ .chroma .cpf { color: #bc7a00 }
/* Generic */ .chroma .g { }
/* GenericDeleted */ .chroma .gd { color: #a00000 }
/* GenericEmph */ .chroma .ge { font-style: italic }
/* GenericError */ .chroma .gr { color: #ff0000 }
/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold }
/* GenericInserted */ .chroma .gi { color: #00a000 }
/* GenericOutput */ .chroma .go { color: #888888 }
/* GenericPrompt */ .chroma .gp { color: #000080; font-weight: bold }
/* GenericStrong */ .chroma .gs { font-weight: bold }
/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold }
/* GenericTraceback */ .chroma .gt { color: #0044dd }
/* GenericUnderline */ .chroma .gl { text-decoration: underline }
/* TextWhitespace */ .chroma .w { color: #bbbbbb }
1 change: 0 additions & 1 deletion themes/docdock
Submodule docdock deleted from 1d12f5
1 change: 1 addition & 0 deletions themes/docdockdoc
Submodule docdockdoc added at 537eec

0 comments on commit 379a0fe

Please sign in to comment.