more content
parent
34d6c12c4d
commit
3ce129234c
9 changed files with 772 additions and 0 deletions
22
APT-WhatProvides.md
Normal file
22
APT-WhatProvides.md
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
APT whatprovides
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
# list packages providing a target
|
||||
|
||||
WHAT="$1"; \
|
||||
apt-cache showpkg "${WHAT}" | sed '/Reverse Provides/,$!d'
|
||||
|
||||
## ./apt-whatprovides.sh php-fpm
|
||||
# Reverse Provides:
|
||||
# php8.0-fpm 8.0.0-1+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php7.4-fpm 7.4.13-1+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php7.3-fpm 7.3.25-1+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php7.2-fpm 7.2.34-8+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php7.1-fpm 7.1.33-24+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php7.0-fpm 7.0.33-37+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php5.6-fpm 5.6.40-38+ubuntu20.04.1+deb.sury.org+1 (= )
|
||||
# php7.4-fpm 7.4.3-4ubuntu2.4 (= )
|
||||
# php7.4-fpm 7.4.3-4ubuntu1 (= )
|
||||
```
|
||||
91
Debian-Upgrade.md
Normal file
91
Debian-Upgrade.md
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
# Prep
|
||||
|
||||
> buster to bullseye
|
||||
|
||||
Before upgrading, upgrade and repair existing problems:
|
||||
|
||||
```
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get full-upgrade
|
||||
|
||||
apt-get autoremove --purge
|
||||
dpkg -l | grep -v ^ii
|
||||
aptitude search "?installed?not(?narrow(?installed,?origin(^Debian$)?archive(^stable)))"
|
||||
apt-mark showmanual
|
||||
```
|
||||
|
||||
# Sources
|
||||
|
||||
the path name of Security changed from Buster to Bullseye, basic example:
|
||||
|
||||
```
|
||||
deb http://mirrors.linode.com/debian bullseye main
|
||||
deb-src http://mirrors.linode.com/debian bullseye main
|
||||
|
||||
deb http://mirrors.linode.com/debian-security bullseye-security main
|
||||
deb-src http://mirrors.linode.com/debian-security bullseye-security main
|
||||
|
||||
deb http://mirrors.linode.com/debian bullseye-updates main
|
||||
deb-src http://mirrors.linode.com/debian bullseye-updates main
|
||||
```
|
||||
|
||||
# Upgrade
|
||||
|
||||
Notes:
|
||||
- choose "yes" to restart services automatically
|
||||
- keep existing configs as desired
|
||||
- let GRUB re-install to the boot disk
|
||||
|
||||
```
|
||||
apt-get update
|
||||
apt-get upgrade
|
||||
apt-get full-upgrade
|
||||
|
||||
reboot
|
||||
```
|
||||
|
||||
# Cleanup
|
||||
|
||||
Look for strays, "rc" tends to mean it can be purged (was to be removed, failed):
|
||||
|
||||
```
|
||||
apt-get autoremove --purge
|
||||
dpkg -l | grep -v ^ii
|
||||
...
|
||||
rc python 2.7.16-1 amd64
|
||||
|
||||
apt-get purge python
|
||||
```
|
||||
|
||||
Look for installed packages not in the repo anymore:
|
||||
|
||||
```
|
||||
aptitude search "?installed?not(?narrow(?installed,?origin(^Debian$)?archive(^stable)))"
|
||||
|
||||
i gcc-8-base - GCC, the GNU Compiler Collection (base pac
|
||||
i libapt-inst2.0 - deb package format runtime library
|
||||
i libapt-pkg5.0 - package management runtime library
|
||||
i libdns-export1104 - Exported DNS Shared Library
|
||||
i libffi6 - Foreign Function Interface library runtime
|
||||
i libgcc1 - GCC support library
|
||||
i libhogweed4 - low level cryptographic library (public-ke
|
||||
i libip4tc0 - netfilter libip4tc library
|
||||
i libip6tc0 - netfilter libip6tc library
|
||||
i libisc-export1100 - Exported ISC Shared Library
|
||||
i libjson-c3 - JSON manipulation library - shared library
|
||||
i libnettle6 - low level cryptographic library (symmetric
|
||||
i libprocps7 - library for accessing process information
|
||||
i A linux-image-4.19.0-17-amd64 - Linux 4.19 for 64-bit PCs (signed)
|
||||
```
|
||||
|
||||
Remove the packages which are safe, no dependencies:
|
||||
|
||||
```
|
||||
apt-get remove --purge gcc-8-base libapt-inst2.0 libapt-pkg5.0 \
|
||||
libdns-export1104 libffi6 libgcc1 libhogweed4 libip4tc0 \
|
||||
libip6tc0 libisc-export1100 libjson-c3 libnettle6 libprocps7 \
|
||||
linux-image-4.19.0-17-amd64
|
||||
```
|
||||
|
||||
The above is an example from a minimal install, the proposed list will vary by installation.
|
||||
306
Firefox-Tweaks.md
Normal file
306
Firefox-Tweaks.md
Normal file
|
|
@ -0,0 +1,306 @@
|
|||
Firefox tweaks
|
||||
|
||||
**user.js**
|
||||
```
|
||||
// user.js
|
||||
// ref: https://github.com/pyllyukko/user.js/blob/master/user.js
|
||||
// updated for v93
|
||||
|
||||
user_pref("accessibility.typeaheadfind.autostart", false);
|
||||
user_pref("accessibility.typeaheadfind.flashBar", 0);
|
||||
user_pref("app.normandy.enabled", false);
|
||||
user_pref("app.shield.optoutstudies.enabled", false);
|
||||
user_pref("beacon.enabled", false);
|
||||
user_pref("camera.control.face_detection.enabled", false);
|
||||
user_pref("config.trim_on_minimize", true);
|
||||
user_pref("datareporting.healthreport.service.enabled", false);
|
||||
user_pref("datareporting.healthreport.service.firstRun", true);
|
||||
user_pref("datareporting.healthreport.uploadEnabled", false);
|
||||
user_pref("datareporting.policy.dataSubmissionEnabled", false);
|
||||
user_pref("device.sensors.enabled", false);
|
||||
user_pref("dom.push.connection.enabled", false);
|
||||
user_pref("dom.push.enabled", false);
|
||||
user_pref("dom.webnotifications.enabled", false);
|
||||
user_pref("experiments.enabled", false);
|
||||
user_pref("experiments.manifest.uri", "");
|
||||
user_pref("experiments.supported", false);
|
||||
user_pref("font.minimum-size.x-western", 14);
|
||||
user_pref("general.smoothScroll", false);
|
||||
user_pref("geo.enabled", false);
|
||||
user_pref("geo.wifi.uri", "");
|
||||
user_pref("media.autoplay.default", 5);
|
||||
user_pref("network.allow-experiments", false);
|
||||
user_pref("network.dns.disablePrefetch", true);
|
||||
user_pref("network.protocol-handler.external.mailto", false);
|
||||
user_pref("pdfjs.disabled", true);
|
||||
user_pref("permissions.default.camera", 2);
|
||||
user_pref("permissions.default.desktop-notification", 2);
|
||||
user_pref("permissions.default.geo", 2);
|
||||
user_pref("permissions.default.microphone", 2);
|
||||
user_pref("permissions.default.xr", 2);
|
||||
user_pref("signon.rememberSignons", false);
|
||||
user_pref("toolkit.telemetry.bhrPing.enabled", false);
|
||||
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
|
||||
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
|
||||
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
|
||||
user_pref("toolkit.telemetry.server", "");
|
||||
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
|
||||
user_pref("toolkit.telemetry.updatePing.enabled", false);
|
||||
|
||||
user_pref("browser.proton.enabled", false);
|
||||
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
|
||||
user_pref("widget.content.gtk-theme-override", "TOK");
|
||||
user_pref("widget.non-native-theme.enabled", false);
|
||||
user_pref("widget.non-native-theme.gtk.scrollbar.allow-buttons", true);
|
||||
user_pref("widget.non-native-theme.gtk.scrollbar.round-thumb", false);
|
||||
user_pref("widget.non-native-theme.scrollbar.active-always-themed", false);
|
||||
user_pref("widget.non-native-theme.scrollbar.size", 16);
|
||||
|
||||
user_pref("browser. safebrowsing. enabled", false);
|
||||
user_pref("browser.safebrowsing.appRepURL", "");
|
||||
user_pref("browser.safebrowsing.malware.enabled", false);
|
||||
user_pref("browser.safebrowsing.phishing.enabled", false);
|
||||
|
||||
user_pref("browser.aboutConfig.showWarning", false);
|
||||
user_pref("browser.aboutHomeSnippets.updateUrl", "");
|
||||
user_pref("browser.bookmarks.showMobileBookmarks", true);
|
||||
user_pref("browser.bookmarks.showRecentlyBookmarked", false);
|
||||
user_pref("browser.download.autohideButton", false);
|
||||
user_pref("browser.download.useDownloadDir", false);
|
||||
user_pref("browser.formfill.enable", false);
|
||||
user_pref("browser.messaging-system.whatsNewPanel.enabled", false);
|
||||
user_pref("browser.selfsupport.enabled", false);
|
||||
user_pref("browser.selfsupport.url", "");
|
||||
user_pref("browser.startup.page", 0);
|
||||
user_pref("browser.xul.error_pages.expert_bad_cert", true);
|
||||
user_pref("browser.zoom.full", false);
|
||||
|
||||
user_pref("extensions.pocket.api", "");
|
||||
user_pref("extensions.pocket.enabled", false);
|
||||
user_pref("extensions.pocket.oAuthConsumerKey", "");
|
||||
user_pref("extensions.pocket.site", "");
|
||||
user_pref("browser.toolbarbuttons.introduced.pocket-button", true);
|
||||
|
||||
user_pref("browser.search.suggest.enabled", false);
|
||||
user_pref("browser.search.widget.inNavBar", true);
|
||||
user_pref("browser.urlbar.formatting.enabled", false);
|
||||
user_pref("browser.urlbar.matchOnlyTyped", true);
|
||||
user_pref("browser.urlbar.searchSuggestionsChoice", false);
|
||||
user_pref("browser.urlbar.showSearchSuggestionsFirst", false);
|
||||
user_pref("browser.urlbar.suggest.engines", false);
|
||||
user_pref("browser.urlbar.suggest.quicksuggest", false);
|
||||
user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false);
|
||||
user_pref("browser.urlbar.suggest.searches", false);
|
||||
user_pref("browser.urlbar.suggest.topsites", false);
|
||||
user_pref("browser.urlbar.trimURLs", false);
|
||||
user_pref("browser.urlbar.update1", false);
|
||||
user_pref("browser.urlbar.update1.interventions", false);
|
||||
user_pref("browser.urlbar.update1.searchTips", false);
|
||||
user_pref("browser.urlbar.update1.view.stripHttps", false);
|
||||
|
||||
user_pref("browser.newtab.preload", false);
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
|
||||
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
|
||||
user_pref("browser.newtabpage.activity-stream.default.sites", "");
|
||||
user_pref("browser.newtabpage.activity-stream.disableSnippets", true);
|
||||
user_pref("browser.newtabpage.activity-stream.enabled", false);
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
|
||||
user_pref("browser.newtabpage.activity-stream.feeds.topsites", false);
|
||||
user_pref("browser.newtabpage.activity-stream.filterAdult", false);
|
||||
user_pref("browser.newtabpage.activity-stream.prerender", false);
|
||||
user_pref("browser.newtabpage.activity-stream.section.highlights.includeBookmarks", false);
|
||||
user_pref("browser.newtabpage.activity-stream.section.highlights.includeDownloads", false);
|
||||
user_pref("browser.newtabpage.activity-stream.section.highlights.includePocket", false);
|
||||
user_pref("browser.newtabpage.activity-stream.section.highlights.includeVisited", false);
|
||||
user_pref("browser.newtabpage.activity-stream.showSearch", false);
|
||||
user_pref("browser.newtabpage.activity-stream.telemetry", false);
|
||||
user_pref("browser.newtabpage.activity-stream.telemetry.ping.endpoint", "");
|
||||
user_pref("browser.newtabpage.activity-stream.topSitesRows", 0);
|
||||
user_pref("browser.newtabpage.directory.ping", "");
|
||||
user_pref("browser.newtabpage.directory.source", "data:text/plain,{}");
|
||||
user_pref("browser.newtabpage.enabled", false);
|
||||
user_pref("browser.newtabpage.enhanced", false);
|
||||
user_pref("browser.newtabpage.pinned", "[]");
|
||||
```
|
||||
|
||||
**userChrome.css**
|
||||
```
|
||||
|
||||
/* userChrome.css */
|
||||
/* ref: https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/non_floating_sharp_tabs.css */
|
||||
/* updated for v93 */
|
||||
|
||||
/* disable various UI elements */
|
||||
|
||||
#star-button { display: none !important; }
|
||||
#feed-button[feeds] { display: none !important; }
|
||||
#context-sendlink { display:none !important; }
|
||||
#context-sendlinktodevice { display:none !important; }
|
||||
#context-sendpage { display:none !important; }
|
||||
#context-sendpagetodevice { display:none !important; }
|
||||
#context-searchselect { display: none !important; }
|
||||
|
||||
/* DISABLE URL BORDER FATNESS */
|
||||
|
||||
#nav-bar{ --toolbar-field-focus-border-color: transparent}
|
||||
|
||||
/* This gets rid of the shadow, prevents the expansion of the URL bar*/
|
||||
|
||||
#urlbar:focus-within > #urlbar-background {
|
||||
box-shadow: none !important;
|
||||
border-color: -moz-accent-color !important;
|
||||
border-width: 1px !important;
|
||||
}
|
||||
|
||||
#urlbar[breakout][breakout-extend] {
|
||||
top: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#urlbar[breakout][breakout-extend] > #urlbar-input-container {
|
||||
height: var(--urlbar-height) !important;
|
||||
padding-block: 0 !important;
|
||||
padding-inline: 0 !important;
|
||||
}
|
||||
|
||||
/* This gets rid of the shadow, prevents the expansion of the Search bar*/
|
||||
|
||||
#searchbar:focus-within {
|
||||
box-shadow: none !important;
|
||||
border-color: -moz-accent-color !important;
|
||||
border-width: 1px !important;
|
||||
}
|
||||
|
||||
#searchbar[breakout][breakout-extend] {
|
||||
top: calc((var(--searchbar-toolbar-height) - var(--searchbar-height)) / 2) !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
#searchbar[breakout][breakout-extend] > #searchbar-textbox {
|
||||
height: var(--searchbar-height) !important;
|
||||
padding-block: 0 !important;
|
||||
padding-inline: 0 !important;
|
||||
}
|
||||
|
||||
/* Bring back tab separator lines that were removed in Proton */
|
||||
|
||||
.tabbrowser-tab:not(:hover, [beforehovered], [selected], [last-visible-tab], [beforeselected-visible])::after {
|
||||
content: "";
|
||||
display: block;
|
||||
border-left: 1px solid currentColor;
|
||||
margin-block: 1px;
|
||||
margin-left: -1px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
/* No round shapes */
|
||||
|
||||
* {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
/* hamburger menu item spacing */
|
||||
|
||||
:root {
|
||||
--arrowpanel-menuitem-padding: 4px 8px !important;
|
||||
}
|
||||
menupopup > menuitem,
|
||||
menupopup > menu {
|
||||
padding-block: 4px !important;
|
||||
}
|
||||
|
||||
/* It's not strictly a requirement, but this style expects compact_proton.css to be loaded before it. */
|
||||
|
||||
:root[id]{
|
||||
--proton-tab-block-margin: 0px !important;
|
||||
--tab-block-margin: 0px !important;
|
||||
--tabs-shadow-size: 1px !important;
|
||||
|
||||
/* Remove next line if you want selected tab to have color other than toolbar background - then it follows your theme color */
|
||||
--lwt-selected-tab-background-color: var(--toolbar-bgcolor) !important;
|
||||
}
|
||||
|
||||
/* removes line under tabs (makes them tabs again) */
|
||||
|
||||
.tabbrowser-tab[visuallyselected="true"] {
|
||||
appearance: tab !important;
|
||||
}
|
||||
|
||||
/* Uncomment next line to force specific color for tab top line */
|
||||
/* #tabbrowser-tabs{ --tab-line-color: blue !important; } */
|
||||
|
||||
/* These next two rules set a color for border around tabs and between tabs & navigation toolbars. Set to transparent to remove the border.*/
|
||||
#nav-bar{
|
||||
/* This overrides value in compact_proton.css */
|
||||
box-shadow: 0 -1px 0 0 color-mix(in srgb, currentcolor 30%, transparent) !important;
|
||||
}
|
||||
.tab-background[selected]{
|
||||
border-inline: 1px solid color-mix(in srgb, currentcolor 30%, transparent) !important;
|
||||
}
|
||||
|
||||
#TabsToolbar{
|
||||
--toolbarbutton-inner-padding: 7px !important;
|
||||
}
|
||||
#navigator-toolbox:not([movingtab]) > #titlebar > #TabsToolbar{
|
||||
--toolbar-bgcolor: transparent;
|
||||
}
|
||||
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-badge-stack,
|
||||
#TabsToolbar .toolbarbutton-1 > .toolbarbutton-icon{ border-radius: 2px !important; }
|
||||
|
||||
/* tabs newtab button needs some special styling... */
|
||||
#tabs-newtab-button{ padding-inline: 0 !important; }
|
||||
#tabbrowser-arrowscrollbox > #tabs-newtab-button > .toolbarbutton-icon{
|
||||
border-radius: 0 !important;
|
||||
width: initial !important;
|
||||
height: initial !important;
|
||||
padding: 9px !important;
|
||||
}
|
||||
:root[uidensity="compact"] #tabbrowser-arrowscrollbox > #tabs-newtab-button > .toolbarbutton-icon{
|
||||
padding: 7px !important;
|
||||
}
|
||||
|
||||
#scrollbutton-up,
|
||||
#scrollbutton-down{ border-radius: 0 !important; border-width: 0 !important; padding-inline: 3px !important; }
|
||||
|
||||
/* tab shaping */
|
||||
.tabbrowser-tab{ padding-inline: 0 !important; }
|
||||
|
||||
:root[uidensity="compact"] #tabbrowser-tabs[positionpinnedtabs] .tabbrowser-tab[pinned]{ min-height: calc(var(--tab-min-height) + 2px) !important; }
|
||||
|
||||
.tab-content[pinned]{ padding-inline: 11px !important; }
|
||||
|
||||
.tab-background{
|
||||
border-radius: 0 !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Line to mark selected tab */
|
||||
.tab-background[selected]::before,
|
||||
.tabbrowser-tab:hover > stack > .tab-background::before{
|
||||
display: -moz-box;
|
||||
height: 2px;
|
||||
content: "";
|
||||
}
|
||||
.tab-stack:hover > .tab-background::before{
|
||||
background-color: inherit;
|
||||
}
|
||||
.tab-stack > .tab-background[selected]::before{
|
||||
background-color: highlight;
|
||||
background-image: linear-gradient(var(--tab-line-color),var(--tab-line-color));
|
||||
}
|
||||
/* Photon-like tab on hover animation for the top line */
|
||||
@keyframes tab-onhover-line-anim{ from{ margin-inline: 20px } to { margin-inline: 0 } }
|
||||
|
||||
.tab-stack:hover > .tab-background::before{ animation: tab-onhover-line-anim 160ms }
|
||||
|
||||
/* Disable animation for selected and pinned tabs */
|
||||
.tabbrowser-tab:is([pinned],[selected]) > .tab-stack > .tab-background::before{ animation: none }
|
||||
|
||||
/* moves context-line to the bottom */
|
||||
.tab-context-line{ -moz-box-ordinal-group: 2; margin-inline: 10px !important; }
|
||||
```
|
||||
|
||||
30
Git-Rewrite-User.md
Normal file
30
Git-Rewrite-User.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
Rewrite git history to change a username/email
|
||||
|
||||
```
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# Rewrite git commit history to replace user/email values
|
||||
# - alters commit history, breaks linked clones/forks/references!
|
||||
#
|
||||
## USE WITH CAUTION
|
||||
|
||||
export FILTER_BRANCH_SQUELCH_WARNING=1
|
||||
|
||||
git filter-branch -f --env-filter '
|
||||
WRONG_EMAIL="olduser@gmail.com"
|
||||
NEW_NAME="newuser"
|
||||
NEW_EMAIL="newuser@example.com"
|
||||
|
||||
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
|
||||
then
|
||||
export GIT_COMMITTER_NAME="$NEW_NAME"
|
||||
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
|
||||
fi
|
||||
if [ "$GIT_AUTHOR_EMAIL" = "$WRONG_EMAIL" ]
|
||||
then
|
||||
export GIT_AUTHOR_NAME="$NEW_NAME"
|
||||
export GIT_AUTHOR_EMAIL="$NEW_EMAIL"
|
||||
fi
|
||||
' --tag-name-filter cat -- --branches --tags
|
||||
```
|
||||
|
||||
81
Git-Server.md
Normal file
81
Git-Server.md
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
Git server notes (incomplete / WIP)
|
||||
|
||||
```
|
||||
Ensure git-shell can be used
|
||||
===============================
|
||||
|
||||
/etc/shells
|
||||
-----------
|
||||
/usr/bin/git-shell
|
||||
|
||||
|
||||
Allow keys outside $HOME
|
||||
===============================
|
||||
|
||||
/etc/ssh/sshd_config
|
||||
--------------------
|
||||
Match User git
|
||||
AuthorizedKeysFile /var/git/ssh/authorized_keys
|
||||
|
||||
systemctl restart sshd.service
|
||||
|
||||
|
||||
Prepare fundamentals, test repo
|
||||
===============================
|
||||
|
||||
MYUSER="abcdefg"
|
||||
|
||||
groupadd -g 55555 git
|
||||
useradd -g git -u 55555 \
|
||||
-s /usr/bin/git-shell \
|
||||
-d /var/git/repos \
|
||||
git
|
||||
|
||||
mkdir -p /var/git/{ssh,repos}
|
||||
touch /var/git/repos/.hushlogin
|
||||
cp /home/$MYUSER/.ssh/authorized_keys \
|
||||
/var/git/ssh/authorized_keys
|
||||
chmod 0700 /var/git/ssh
|
||||
chmod 0600 /var/git/ssh/authorized_keys
|
||||
|
||||
mkdir /var/git/repos/git-shell-commands
|
||||
cat << 'EOF' > /var/git/repos/git-shell-commands/no-interactive-login
|
||||
#!/bin/sh
|
||||
echo "git interactive login not supported"
|
||||
exit 128
|
||||
EOF
|
||||
chmod 0755 /var/git/repos/git-shell-commands/no-interactive-login
|
||||
|
||||
mkdir -p /var/git/repos/${MYUSER}/test.git
|
||||
cd /var/git/repos/${MYUSER}/test.git
|
||||
git init --bare --shared
|
||||
|
||||
chown -R git:git /var/git
|
||||
|
||||
|
||||
Push from workstation to above
|
||||
===============================
|
||||
|
||||
mkdir test
|
||||
cd test
|
||||
git init
|
||||
git config user.email myuser@domain
|
||||
git config user.name myuser
|
||||
echo "README" > README
|
||||
git add .
|
||||
git commit -m "Initial commit" README
|
||||
git remote add origin git@example.com:myuser/test.git
|
||||
|
||||
|
||||
Webview Research
|
||||
========================
|
||||
|
||||
https://sourcevirtues.com/2012/03/04/setup-git-server-with-https-on-debian-stable/
|
||||
https://floatingoctothorpe.uk/2017/setting-up-cgit-on-debian.html
|
||||
https://codemadness.org/stagit.html
|
||||
|
||||
cgit gotcha, order matters:
|
||||
snapshots=tar.gz tar.bz2 zip
|
||||
scan-path=/path/to/your/repositories
|
||||
```
|
||||
|
||||
12
IPv4-Default-Gateway.md
Normal file
12
IPv4-Default-Gateway.md
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
Default IPv4 gateway out of `ip`
|
||||
|
||||
```
|
||||
#!/bin/sh
|
||||
|
||||
# get ipv4 default gateway with ip / grep
|
||||
|
||||
# This uses a parsing quirk of `ip`, 1 == 1.0.0.0
|
||||
# see iproute2/lib/utils.c -> get_addr_ipv4()
|
||||
ip -4 -oneline route get 1 | grep -Po 'src \K([\d.]+)'
|
||||
```
|
||||
|
||||
23
MX-Blackhole.md
Normal file
23
MX-Blackhole.md
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
DNS records to route all email (spam) to honeypots
|
||||
|
||||
```
|
||||
# dns records for no-email domains
|
||||
|
||||
## https://www.gov.uk/guidance/protect-domains-that-dont-send-email
|
||||
@ TXT "v=spf1 -all"
|
||||
*._domainkey TXT "v=DKIM1; p="
|
||||
_dmarc TXT "v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s;fo=1;"
|
||||
|
||||
## https://wiki.junkemailfilter.com/index.php/Project_Tar
|
||||
@ MX 10 tar.junkemailfilter.com
|
||||
|
||||
## https://abusix.com/blackhole-mx/
|
||||
@ MX 20 void.blackhole.mx
|
||||
|
||||
## https://www.dnswl.org/?page_id=17
|
||||
@ MX 30 mail-in.verboten.net
|
||||
|
||||
## https://fakemx.org/
|
||||
@ MX 40 mx.fakemx.net
|
||||
```
|
||||
|
||||
199
Weechat-Quickstart.md
Normal file
199
Weechat-Quickstart.md
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
# Weechat Quickstart
|
||||
|
||||
I use a 100x30 terminal window with tmux running weechat, the visual settings below are tuned to keep it from looking like a mess. Really long nicknames start resizing the weechat windows/buffers when left at the default settings.
|
||||
|
||||
## Core Settings
|
||||
|
||||
Buffer config settings; restart weechat before adding/joining servers:
|
||||
```
|
||||
/set irc.look.server_buffer independent
|
||||
/set irc.look.new_channel_position near_server
|
||||
/set irc.look.new_pv_position near_server
|
||||
|
||||
/set weechat.look.buffer_time_format "%H:%M"
|
||||
/secure passphrase xxxxxxxxx
|
||||
/save
|
||||
```
|
||||
|
||||
Set a hard max size on buflist, chat and nicklist (100x30 terminal):
|
||||
```
|
||||
/set weechat.bar.buflist.size_max 17
|
||||
/set weechat.look.prefix_align_max 11
|
||||
/set weechat.bar.nicklist.size_max 15
|
||||
```
|
||||
|
||||
Filter out join/part/quit (see `/fset irc.look.smart*`)
|
||||
```
|
||||
/filter add irc_smart * irc_smart_filter *
|
||||
```
|
||||
|
||||
Set default user info:
|
||||
```
|
||||
/set irc.server_default.nicks "nick,nick1,nick2,nick3,nick4"
|
||||
/set irc.server_default.username "nick"
|
||||
/set irc.server_default.realname "nick"
|
||||
```
|
||||
|
||||
Reduce the amount of personal information shared:
|
||||
```
|
||||
/set logger.file.auto_log off
|
||||
/set irc.server_default.msg_part ""
|
||||
/set irc.server_default.msg_quit ""
|
||||
/set irc.ctcp.clientinfo ""
|
||||
/set irc.ctcp.finger ""
|
||||
/set irc.ctcp.source ""
|
||||
/set irc.ctcp.time ""
|
||||
/set irc.ctcp.userinfo ""
|
||||
/set irc.ctcp.version ""
|
||||
/set irc.ctcp.ping ""
|
||||
```
|
||||
|
||||
More settings to help secure, filter and anonymize to taste:
|
||||
|
||||
- http://www.futurile.net/2020/11/29/weechat-configuration-for-irc-and-slack/
|
||||
|
||||
|
||||
## Networks and Channels
|
||||
|
||||
[Reference](https://en.wikipedia.org/wiki/Wikipedia:IRC/Channel_access_and_configuration_guide)
|
||||
|
||||
Configure **Tilde**, **Libera** and/or **OFTC**:
|
||||
```
|
||||
/server add tilde irc.tilde.chat/6697 -ssl
|
||||
/set irc.server.tilde.nicks "nick,nick2,nick3"
|
||||
/set irc.server.tilde.username "nick"
|
||||
/set irc.server.tilde.realname "nick"
|
||||
|
||||
/server add libera irc.libera.chat/6697 -ssl
|
||||
/set irc.server.libera.nicks "nick,nick2,nick3"
|
||||
/set irc.server.libera.username "nick"
|
||||
/set irc.server.libera.realname "nick"
|
||||
|
||||
/server add oftc irc.oftc.net/6697 -ssl
|
||||
/set irc.server.oftc.nicks "nick,nick2,nick3"
|
||||
/set irc.server.oftc.username "nick"
|
||||
/set irc.server.oftc.realname "nick"
|
||||
```
|
||||
|
||||
Protect your login on **Tilde** or **Libera**:
|
||||
```
|
||||
/connect tilde
|
||||
/msg nickserv register <password> <email>
|
||||
/secure set tilde_password xxxxxxxxxxx
|
||||
/set irc.server.tilde.sasl_username "nick"
|
||||
/set irc.server.tilde.sasl_password "${sec.data.tilde_password}"
|
||||
|
||||
/connect libera
|
||||
/msg nickserv register <password> <email>
|
||||
/secure set libera_password xxxxxxxxxxx
|
||||
/set irc.server.libera.sasl_username "nick"
|
||||
/set irc.server.libera.sasl_password "${sec.data.libera_password}"
|
||||
```
|
||||
|
||||
Potect your login on **OFTC** - [Nickserv Validation](https://services.oftc.net/):
|
||||
```
|
||||
/connect oftc
|
||||
/msg nickserv register <password> <email>
|
||||
/secure set oftc_password xxxxxxxxxxx
|
||||
/set irc.server.oftc.command "/eval /msg nickserv identify ${sec.data.oftc_password}"
|
||||
```
|
||||
|
||||
Cloak request on **Tilde** (use a fake domain name):
|
||||
```
|
||||
/msg HostServ request random.tld
|
||||
```
|
||||
Tilde requires an admin to manually assign your cloak, read the instructions on-screen.
|
||||
|
||||
Cloak yourself on **Libera**:
|
||||
```
|
||||
/j #libera-Cloak
|
||||
!cloakme
|
||||
```
|
||||
|
||||
Cloak yourself on **OFTC**:
|
||||
```
|
||||
/msg nickserv set cloak on
|
||||
```
|
||||
|
||||
Automatically join things:
|
||||
```
|
||||
/set irc.server.tilde.autoconnnect on
|
||||
/set irc.server.tilde.autojoin "#chan1,##chan2"
|
||||
|
||||
/set irc.server.libera.autoconnect on
|
||||
/set irc.server.libera.autojoin "#chan1,##chan2"
|
||||
|
||||
/set irc.server.oftc.autoconnect on
|
||||
/set irc.server.oftc.autojoin "#chan1,##chan2"
|
||||
```
|
||||
|
||||
Set up a channel to keep running on it's own on **Libera**:
|
||||
```
|
||||
/j ##foobar
|
||||
/msg chanserv register ##foobar
|
||||
/msg chanserv flags ##foobar nick_of_other_founder +F
|
||||
/msg chanserv flags ##foobar nick_of_other_op +votsriRefA
|
||||
/msg chanserv set ##fobar guard on
|
||||
```
|
||||
|
||||
|
||||
## Keyboard Shortcuts
|
||||
|
||||
[Reference](https://weechat.org/files/doc/stable/weechat_user.en.html#key_bindings)
|
||||
|
||||
The below table reflects common keystrokes which actually work in my `mate-terminal`:
|
||||
|
||||
| Shortcut | Command | Description |
|
||||
|------------ |----------------------------- |--------------------------------------------- |
|
||||
| Pgup | | Move up one page in the channel scrollback |
|
||||
| Alt+Home | | Move to beginning of the channel scrollback |
|
||||
| PgDn | | Move down one page in the channel scrollback |
|
||||
| Alt+End | | Move to the end of the channel scrollback |
|
||||
| F5 | /buffer -1 | Switch to previous buffer |
|
||||
| F6 | /buffer +1 | Switch to next buffer |
|
||||
| Alt+# | /buffer # | Switch to numbered buffer 1-9 |
|
||||
| Alt+j,## | /buffer ## | Switch to numbered buffer 10-99 |
|
||||
| Alt+l | /window bare | Switch to bare display of current window |
|
||||
| F7 | /window -1 | Switch to previous window |
|
||||
| F8 | /window +1 | Switch to next window |
|
||||
| Ctrl+F1 | /bar scroll buflist * -100% | Scroll up one page in buffer list |
|
||||
| Ctrl+F2 | /bar scroll buflist * +100% | Scroll down one page in buffer list |
|
||||
| Alt+F11 | /bar scroll nicklist * b | Scroll to beginning of nick list |
|
||||
| Alt+F12 | /bar scroll nicklist * e | Scroll to end of nick list |
|
||||
|
||||
F11 is typically trapped as "Full Screen" by many Linux desktops; F1, F2, Alt+F1, Alt+F2, Ctrl+F11 and Ctrl+F12 are usually trapped for other desktop actions as well. Some documented keystrokes such as Alt+PgUp simply do nothing for me and seem dead, however documentation indicates they should work so your mileage may vary depending on specific terminal type being used.
|
||||
|
||||
### Mapping Keys
|
||||
|
||||
| Shortcut | Command | Description |
|
||||
|------------ |----------------------------- |-------------------------------------- |
|
||||
| Ctrl+F9 | /bar scroll title * -30% | Scroll buffer’s title on the left |
|
||||
| Ctrl+F10 | /bar scroll title * +30% | Scroll buffer’s title on the right |
|
||||
| Ctrl+F11 | /bar scroll nicklist * -100% | Scroll Scroll up one page in nicklist |
|
||||
| Ctrl+F12 | /bar scroll nicklist * +100% | Scroll down one page in nicklist |
|
||||
|
||||
The default bindings for `F9` / `F10` are trapped by the window manager and have no alternate binding. By default `Ctrl+F9` and `Ctrl+F10` are not used, so we can map those to the same actions:
|
||||
|
||||
```
|
||||
/key bind meta2-20;5~ /bar scroll title * -30%
|
||||
/key bind meta2-21;5~ /bar scroll title * +30%
|
||||
```
|
||||
|
||||
The official documentation indicates `Ctrl+F11` / `Ctrl+F12` are mapped to scrolling the nicklist buffer, however they do not seem to actually work out of the box. Map them as documented:
|
||||
|
||||
```
|
||||
/key bind meta2-23;5~ /bar scroll nicklist * -100%
|
||||
/key bind meta2-24;5~ /bar scroll nicklist * +100%
|
||||
```
|
||||
|
||||
To map a keystroke without knowing it's code ("meta2-20;5~" e.g.), type `Alt-k` and then type the keystroke to map and weechat will insert the correct code for you.
|
||||
|
||||
### Filters
|
||||
|
||||
Filter out a "sed bot" which is just unnecessary spam (the inference is implied), replace "FOO" with the name of the irc channel profile created above (libera, oftc, etc.) and BAR with the nick of the bot name.
|
||||
|
||||
```
|
||||
/filter addreplace BAR_sed irc.FOO.* nick_BAR ^\[Sed\]
|
||||
```
|
||||
|
||||
Adjust the regex on the right to the specific bot output.
|
||||
|
|
@ -4,15 +4,22 @@
|
|||
|
||||
## Index
|
||||
|
||||
- [[APT WhatProvides]]
|
||||
- [[Apache wpadmin]]
|
||||
- [[DB2 Info]]
|
||||
- [[Debian Upgrade]]
|
||||
- [[Dell OpenManage]]
|
||||
- [[Find Examples]]
|
||||
- [[Firefox Tweaks]]
|
||||
- [[Git Multi SSH]]
|
||||
- [[Git Rewrite User]]
|
||||
- [[Git Server]]
|
||||
- [[Glibc IPv4]]
|
||||
- [[GnuPG Things]]
|
||||
- [[IPv4 Default Gateway]]
|
||||
- [[Kernel Boot Debug]]
|
||||
- [[LUKS Encrypted Partitions]]
|
||||
- [[MX Blackhole]]
|
||||
- [[Mount qcow2]]
|
||||
- [[Netcat Replacements]]
|
||||
- [[Proxmox Doodads]]
|
||||
|
|
@ -24,4 +31,5 @@
|
|||
- [[Thunderbird LDAP AD]]
|
||||
- [[uBlock Filters]]
|
||||
- [[udev Hide Partitions]]
|
||||
- [[Weechat Quickstart]]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue