aboutsummaryrefslogtreecommitdiff
path: root/wiki
diff options
context:
space:
mode:
authorBradley Taunt <bt@btxx.org>2024-07-01 16:23:43 -0400
committerBradley Taunt <bt@btxx.org>2024-07-01 16:23:43 -0400
commit088c87bcb58be576308da503d4f11a68843c5013 (patch)
tree4299b974a40b22fcc9d1d2df0a67810f1e61d50c /wiki
Initial new commit
Diffstat (limited to 'wiki')
-rw-r--r--wiki/alpine-linux.md41
-rw-r--r--wiki/cgit.md61
-rw-r--r--wiki/dotfiles.md142
-rw-r--r--wiki/ikiwiki_NearlyFreeSpeech.md100
-rw-r--r--wiki/ikiwiki_comments.md19
-rw-r--r--wiki/ikiwiki_search.md25
-rw-r--r--wiki/index.md48
-rw-r--r--wiki/openbsd.md10
-rw-r--r--wiki/openbsd_desktop_environment.md60
-rw-r--r--wiki/openbsd_installation.md102
-rw-r--r--wiki/ps2.md10
-rw-r--r--wiki/ps2_networking.md21
-rw-r--r--wiki/ps2_pcsx2.md15
-rw-r--r--wiki/qutebrowser.md32
-rw-r--r--wiki/safari.md35
-rw-r--r--wiki/scripts.md78
-rw-r--r--wiki/sublime-text.md51
-rw-r--r--wiki/ubuntu.md89
-rw-r--r--wiki/wordpress_NearlyFreeSpeech_Setup.md162
-rw-r--r--wiki/wordpress_database_update.md25
-rw-r--r--wiki/xbox.md9
-rw-r--r--wiki/xbox_softmodding.md28
22 files changed, 1163 insertions, 0 deletions
diff --git a/wiki/alpine-linux.md b/wiki/alpine-linux.md
new file mode 100644
index 0000000..53d2e4e
--- /dev/null
+++ b/wiki/alpine-linux.md
@@ -0,0 +1,41 @@
+---
+layout: page
+title: Alpine Linux
+permalink: /wiki/alpine-linux
+---
+
+This page contains a helpful collection of configuration and application setups for Alpine Linux.
+
+## Run Mullvad on Alpine Linux (Wireguard)
+
+
+ # Install wireguard
+ apk add wireguard-tools
+
+
+Login into Mullvad and download the proper wireguard configuration files(s). After downloaded, place in the proper directory:
+
+
+ doas cp <MULLVAD_FILENAME>.conf /etc/wireguard/"
+
+
+Then setup an aliases for easier up/down states:
+
+
+ alias vpnup="doas wg-quick up /etc/wireguard/<MULLVAD_FILENAME>.conf"
+ alias vpndown="doas wg-quick down /etc/wireguard/<MULLVAD_FILENAME>.conf"
+
+## Alpine Linux `mini_racer` Tweaks
+
+Gem lockfile:
+
+
+ PLATFORMS
+ ruby
+ x86_64-linux-musl
+
+ mini_racer (0.6.3)
+ <remove child dependency>
+
+
+then run: `bundle update mini_racer`
diff --git a/wiki/cgit.md b/wiki/cgit.md
new file mode 100644
index 0000000..ebf8845
--- /dev/null
+++ b/wiki/cgit.md
@@ -0,0 +1,61 @@
+---
+layout: page
+title: cgit
+permalink: /wiki/cgit
+---
+
+This page contains a comprehensive guide to setting up cgit on NearlyFreeSpeech. It is assumed that you already have an account with NFS and also have access to a "site" online.
+
+Most of the following has been lifted from [NearlyFreeSpeech cgit application walkthrough](https://members.nearlyfreespeech.net/wiki/Applications/Cgit) but has been tweaked and updated.
+
+You can see a **live version** [here](https://git.btxx.org).
+
+## Building cgit
+
+The following assumes that you wish to have cgit running at the top-level of your chosen domain (ie. git.example.com)
+
+SSH into your account then download and unpack the latest release:
+
+ git clone git://git.zx2c4.com/cgit cgit-src
+ cd cgit-src
+
+Create a cgit.conf file with desired locations:
+
+ CGIT_SCRIPT_PATH = /home/public
+ CGIT_DATA_PATH = $(CGIT_SCRIPT_PATH)
+ CGIT_CONFIG = $(CGIT_SCRIPT_PATH)/cgitrc
+ CACHE_ROOT = $(CGIT_SCRIPT_PATH)/cgitcache
+ prefix = $(CGIT_SCRIPT_PATH)/local
+
+Get the git sources (needed to build libgit):
+
+ git submodule init
+ git submodule update
+
+Build and install it:
+
+ gmake install
+
+## Configuration
+
+Make a text file named `cgitrc` where you specified CGIT_CONFIG and add the following (these are some personal defaults to make things cleaner):
+
+ logo=/cgit.png
+ root-title=main root title
+ root-desc=description for your git server
+ root-readme=/home/public/about.md
+ virtual-root=/
+
+ about-filter=/home/public/cgit-src/filters/about-formatting.sh
+ readme=:README.md
+ readme=:README
+
+ include=/home/protected/cgitrepos
+
+Then in the specified file (`cgitrepos`), place your repos, ex:
+
+ repo.url=MyRepo
+ repo.path=/home/public/MyRepo.git
+ repo.desc=This is my git repository
+
+**And you should be good to go!**
diff --git a/wiki/dotfiles.md b/wiki/dotfiles.md
new file mode 100644
index 0000000..dfbcb89
--- /dev/null
+++ b/wiki/dotfiles.md
@@ -0,0 +1,142 @@
+---
+layout: page
+title: Dotfiles
+permalink: /wiki/dotfiles
+---
+
+This page contains my (mostly) up-to-date dotfiles for a wide range of use cases.
+
+## .vimrc
+
+
+ " Don't try to be vi compatible
+ set nocompatible
+
+ " Helps force plugins to load correctly when it is turned back on below
+ filetype off
+
+ " TODO: Load plugins here (pathogen or vundle)
+
+ " Turn on syntax highlighting
+ syntax on
+
+ " For plugins to load correctly
+ filetype plugin indent on
+
+ " TODO: Pick a leader key
+ " let mapleader = ","
+
+ " Security
+ set modelines=0
+
+ " Show line numbers
+ set number
+
+ " Show file stats
+ set ruler
+
+ " Blink cursor on error instead of beeping (grr)
+ set visualbell
+
+ " Encoding
+ set encoding=utf-8
+
+ " Whitespace
+ set wrap
+ set textwidth=79
+ set formatoptions=tcqrn1
+ set tabstop=2
+ set shiftwidth=2
+ set softtabstop=2
+ set expandtab
+ set noshiftround
+
+ " Cursor motion
+ set scrolloff=3
+ set backspace=indent,eol,start
+ set matchpairs+=<:> " use % to jump between pairs
+ runtime! macros/matchit.vim
+
+ " Move up/down editor lines
+ nnoremap j gj
+ nnoremap k gk
+
+ " Allow hidden buffers
+ set hidden
+
+ " Rendering
+ set ttyfast
+
+ " Status bar
+ set laststatus=2
+
+ " Last line
+ set showmode
+ set showcmd
+
+ " Searching
+ nnoremap / /\v
+ vnoremap / /\v
+ set hlsearch
+ set incsearch
+ set ignorecase
+ set smartcase
+ set showmatch
+ map <leader><space> :let @/=''<cr> " clear search
+
+ " Remap help key.
+ inoremap <F1> <ESC>:set invfullscreen<CR>a
+ nnoremap <F1> :set invfullscreen<CR>
+ vnoremap <F1> :set invfullscreen<CR>
+
+ " Textmate holdouts
+
+ " Formatting
+ map <leader>q gqip
+
+ " Visualize tabs and newlines
+ set listchars=tab:▸\ ,eol:¬
+ " Uncomment this to enable by default:
+ " set list " To enable by default
+ " Or use your leader key + l to toggle on/off
+ map <leader>l :set list!<CR> " Toggle tabs and EOL
+
+ " Color scheme (terminal)
+ set t_Co=256
+ set background=dark
+ let g:solarized_termcolors=256
+ let g:solarized_termtrans=1
+ " put https://raw.github.com/altercation/vim-colors-solarized/master/colors/solarized.vim
+ " in ~/.vim/colors/ and uncomment:
+ " colorscheme solarized
+
+## .zshrc extras / aliases
+
+ export EDITOR="/bin/vim"
+
+ alias suck="sudo rm -rf config.h ; sudo make install"
+ alias fixmonitor="xrandr --auto --output eDP1 --mode 1366x768 --below DP2-2"
+ alias alias vscode="ENABLE_WASM=1 chrome --enable-wasm --disable-unveil"
+ export PATH="/usr/local/bin:$PATH"
+ export PATH="$PATH:/opt/local/bin"
+ export PATH="$PATH:/mongodb/bin"
+
+## mimeapps.list
+
+Place this file under `/usr/share/applications/mimeapps.list`
+
+ [Default Applications]
+ x-scheme-handler/http=org.qutebrowser.qutebrowser.desktop
+ x-scheme-handler/https=org.qutebrowser.qutebrowser.desktop
+ x-scheme-handler/ftp=org.qutebrowser.qutebrowser.desktop
+ x-scheme-handler/chrome=org.qutebrowser.qutebrowser.desktop
+ text/html=org.qutebrowser.qutebrowser.desktop
+ application/x-extension-htm=org.qutebrowser.qutebrowser.desktop
+ application/x-extension-html=org.qutebrowser.qutebrowser.desktop
+ application/x-extension-shtml=org.qutebrowser.qutebrowser.desktop
+ application/xhtml+xml=org.qutebrowser.qutebrowser.desktop
+ application/x-extension-xhtml=org.qutebrowser.qutebrowser.desktop
+ application/x-extension-xht=org.qutebrowser.qutebrowser.desktop
+ image/jpeg=feh
+ image/png=feh
+ image/webp=feh
diff --git a/wiki/ikiwiki_NearlyFreeSpeech.md b/wiki/ikiwiki_NearlyFreeSpeech.md
new file mode 100644
index 0000000..e37f575
--- /dev/null
+++ b/wiki/ikiwiki_NearlyFreeSpeech.md
@@ -0,0 +1,100 @@
+---
+layout: page
+title: ikiwiki on NearlyFreeSpeech
+permalink: /wiki/ikiwiki/nearlyfreespeech
+---
+
+This page documents step-by-step how to properly setup and customize *ikiwiki* on [NearlyFreeSpeech](https://nearlyfreespeech.net). A good deal of the documentation here has been lifted from [ikiwiki.info/tips/nearlyfreespeech/](https://ikiwiki.info/tips/nearlyfreespeech/) but altered and updated.
+
+## Register for an account and set up a site
+
+After you get an account, create a site using their web interface.
+
+Mine is named `ikiwiki-test` and I used their DNS instead of getting my own, resulting in http://ikiwiki-test.nfshost.com/. (Not being kept up anymore.)
+
+They gave me 2 cents free funding for signing up, which is enough to pay for 10 megabytes of bandwidth, or about a thousand typical page views, at their current rates. Plenty to decide if this is right for you. If it is, $5 might be a good starting amount of money to put in your account.
+
+## ssh in and configure the environment
+
+ssh into their server using the ssh hostname and username displayed on the site's information page. Example:
+
+ ssh username_ikiwiki-test@ssh.phx.nearlyfreespeech.net
+
+Now set up `.profile` to run programs from `~/bin`.
+
+ cd $HOME
+ echo "PATH=$PATH:$HOME/bin" > .profile
+ . .profile
+
+## Download an unpack ikiwiki
+
+First, be sure to be under the proper `private` directory:
+
+ cd /home/private
+
+Use `wget` to download the ikiwiki tarball. You can find the `tar` file at the bottom of this page: [packages.debian.org/unstable/source/ikiwiki](https://packages.debian.org/unstable/source/ikiwiki)
+
+Then unpack it:
+
+ tar zxvf ikiwiki*.tar.gz
+
+## Build and install ikiwiki
+
+ cd ikiwiki
+ export MAKE=gmake
+ perl Makefile.PL INSTALL_BASE=$HOME PREFIX=
+ $MAKE
+ $MAKE install
+
+## Create your wiki
+
+All it takes to create a fully functional wiki using ikiwiki is running one command.
+
+ ikiwiki --setup /etc/ikiwiki/auto.setup
+
+Or, set up a blog with ikiwiki, run this command instead.
+
+ ikiwiki --setup /etc/ikiwiki/auto-blog.setup
+
+Either way, it will ask you a couple of questions.
+
+ What will the wiki be named? foo
+ What revision control system to use? git
+ What wiki user (or openid) will be admin? username
+ Choose a password:
+
+Then, wait for it to tell you an url for your new site..
+
+ Successfully set up foo:
+ url: http://example.com/~username/foo
+ srcdir: ~/foo
+ destdir: ~/public_html/foo
+ repository: ~/foo.git
+ To modify settings, edit ~/foo.setup and then run:
+ ikiwiki --setup ~/foo.setup
+
+We are almost done, but some parameters will most likely be incorrect. Edit your `foo.setup` file and change:
+
+- `url` to `yoursitename.nfshost.com`
+- `srcdir` to `/home/private/foo`
+- `destdir` to `/home/public`
+- `cgiurl` to `http://yoursitename.nfshost.com/ikiwiki.cgi`
+- `cgi_wrapper` to `/home/public/ikiwiki.cgi`
+
+Now rebuild again using:
+
+
+ ikiwiki --setup foo.setup
+
+
+All done with building ikiwiki!
+
+## Setting up SSL
+
+Navigate to your main `public` directory and run the following:
+
+
+ tls-setup.sh
+
+
+Follow the easy instructions and you'll have proper SSL setup in seconds!
diff --git a/wiki/ikiwiki_comments.md b/wiki/ikiwiki_comments.md
new file mode 100644
index 0000000..2cec3f7
--- /dev/null
+++ b/wiki/ikiwiki_comments.md
@@ -0,0 +1,19 @@
+---
+layout: page
+title: ikiwiki Comments
+permalink: /wiki/ikiwiki/comments
+---
+
+Content on this page is based off the discussions found here: [ikiwiki.info/tips/comments_feed/](http://ikiwiki.info/tips/comments_feed/)
+
+You've enabled the comments plugin, so a set of pages on your blog can have comments added to them. Pages with comments even have special feeds that can be used to subscribe to those comments. But you'd like to add a feed that contains all the comments posted to any page. Here's how:
+
+ \[[!inline pages="comment(*)" template=comment]]
+
+The special PageSpec matches all comments. The template causes the comments to be displayed formatted nicely.
+
+---
+
+It's also possible to make a feed of comments that are held pending moderation.
+
+ \[[!inline pages="comment_pending(*)" template=comment]]
diff --git a/wiki/ikiwiki_search.md b/wiki/ikiwiki_search.md
new file mode 100644
index 0000000..0758a16
--- /dev/null
+++ b/wiki/ikiwiki_search.md
@@ -0,0 +1,25 @@
+---
+layout: page
+title: ikiwiki Search
+permalink: /wiki/ikiwiki/search
+---
+
+This page focuses on properly setting up ikiwiki search on [[ikiwiki/NearlyFreeSpeech]].
+
+## Proper Packages
+
+You will need to install/enable `xapian-omega` in order to use the default ikiwiki search plugin. Switching your NFS realm to "white" should fix this problem but if not, you will need to reach out to support and request they add it for you.
+
+Once that is complete, edit your `foo.setup` file and update the `omega` path to:
+
+
+ /usr/local/www/xapian-omega/cgi-bin/omega
+
+
+Then rebuild your ikiwiki:
+
+
+ ikiwiki --setup foo.setup
+
+
+Now your web search should be working!
diff --git a/wiki/index.md b/wiki/index.md
new file mode 100644
index 0000000..f053d47
--- /dev/null
+++ b/wiki/index.md
@@ -0,0 +1,48 @@
+---
+layout: page
+title: Wiki
+permalink: /wiki/
+---
+
+This is the homepage for my personal wiki. All sub-directories are listed below. This wiki is a growing set of documents, so things may change often.
+
+### Software
+
+- [Alpine Linux](/wiki/alpine-linux)
+- [Dotfiles](/wiki/dotfiles)
+- [OpenBSD](/wiki/openbsd)
+- [Qutebrowser](/wiki/qutebrowser)
+- [Safari](/wiki/safari)
+- [Scripts](/wiki/scripts)
+- [Sublime Text](/wiki/sublime-text)
+- [Ubuntu](/wiki/ubuntu)
+
+---
+
+### Hardware
+
+- [Xbox](/wiki/xbox)
+- [PS2](/wiki/ps2)
+
+---
+
+### Version Control Systems
+
+- [cgit](/wiki/cgit)
+
+---
+
+### ikiwiki
+
+My own custom documentation for ikiwiki:
+
+- [NearlyFreeSpeech](/wiki/ikiwiki/NearlyFreeSpeech)
+- [Comments](/wiki/ikiwiki/comments)
+- [Search](/wiki/ikiwiki/search)
+
+### WordPress
+
+- [Database Update](/wiki/wordpress/database_update)
+- [NearlyFreeSpeech Setup](/wiki/wordpress/NearlyFreeSpeech_Setup)
+
+
diff --git a/wiki/openbsd.md b/wiki/openbsd.md
new file mode 100644
index 0000000..6ec9650
--- /dev/null
+++ b/wiki/openbsd.md
@@ -0,0 +1,10 @@
+---
+layout: page
+title: OpenBSD
+permalink: /wiki/openbsd
+---
+
+This page contains all of my personal scripts and tutorials for OpenBSD. The content ranges from setting up laptops and desktops, to running personal servers and optimization tweaks.
+
+* [Installation](/wiki/openbsd/installation)
+* [Desktop Environment](/wiki/openbsd/desktop_environment)
diff --git a/wiki/openbsd_desktop_environment.md b/wiki/openbsd_desktop_environment.md
new file mode 100644
index 0000000..993da29
--- /dev/null
+++ b/wiki/openbsd_desktop_environment.md
@@ -0,0 +1,60 @@
+---
+layout: page
+title: OpenBSD Desktop Environment
+permalink: /wiki/openbsd/desktop_environment
+---
+
+This page covers the initial setup for installing and configuring `dwm` as a desktop environment on OpenBSD. Everything posted here relies on my personal "Open Suck" installer: [Open Suck](https://git.btxx.org/open-suck/about/)
+
+## Show Don't Tell
+
+<figure>
+<img src="https://btxx.org/posts/OpenBSD_is_a_Cozy_Operating_System/open-suck-75.png" alt="Screenshot of OpenBSD 7.5 running dwm">
+<figcaption>Open Suck: OpenBSD 7.5 running dwm on my X220</figcaption>
+</figure>
+
+## What You Get
+
+The Open Suck installer gives you the absolute barebones desktop experience:
+
+- `dwm` for window management
+- `qutebrowser` as your core web browser
+- `aerc` for your terminal-based mail client
+- `slock` for screen locking
+- `scrot`/`slop` for simple screenshot utilities
+- `dunst` for notifications
+
+## Required Packages
+
+Before we begin setting things up, you will need to install `git`, `vim`, `bash`:
+
+ pkg_add git vim bash
+
+## Cloning the Project
+
+Clone the main installer project and navigate instead the directory:
+
+ git clone https://git.btxx.org/open-suck
+ cd open-suck
+
+## Installing
+
+1. Install dependencies by running `./install-dependencies.sh`. The script will simply read required packages from `dependencies.txt` and run `pkg_add`.
+2. Compile and install suckless software by running the `./install.sh`
+
+## TL;DR
+
+ # Install OpenBSD packages
+ doas sh ./install-dependencies.sh
+ # Install suckless tools
+ doas sh ./install.sh
+ # Apply .xinitrc
+ cp .xinitrc ~/.xinitrc
+
+Reboot the machine. Log in as your main user. Run:
+
+
+ startx
+
+
+That's it! You now have a fully functional desktop environment built on top of `dwm`.
diff --git a/wiki/openbsd_installation.md b/wiki/openbsd_installation.md
new file mode 100644
index 0000000..ed33343
--- /dev/null
+++ b/wiki/openbsd_installation.md
@@ -0,0 +1,102 @@
+---
+layout: page
+title: Installing OpenBSD
+permalink: /wiki/openbsd/installation
+---
+
+Below you can find instructions for installing OpenBSD on a personal computer.
+
+The example below covers installing **OpendBSD 7.5** on a X220 ThinkPad laptop.
+
+## Requirements
+
+* USB device
+* Ethernet connection (with active internet)
+* A cup of coffee
+
+## Before the Install
+
+Make sure you have the latest OpenBSD image formatted on your USB device and that your computer/laptop is set to boot from USB via the BIOS.
+
+## Installation
+
+1. Boot from USB
+2. Choose `Install`
+3. Keyboard layout: `us`
+4. Hostname: `x220` (or whatever you choose)
+5. Network: `em0`
+6. IPv4: `autoconf`
+7. IPv6: `none`
+8. Network interface: `done`
+9. Password for root
+10. Start sshd by default? `yes`
+11. X Window System start with xenodm? `no`
+12. Setup user? `username` (follow setup user steps)
+13. Allow root ssh login? `no`
+14. Timezone
+15. Which disk? Use internal (`sd0` etc.)
+16. Encrypt root disk? `no`
+17. Use `WHOLE` disk
+18. Use `AUTO` layout
+19. Which disk to initialize: `done`
+20. Location of sets: `http`
+21. HTTP Proxy URL? `none`
+22. HTTP Server? `1` (Toronto)
+23. Confirm again
+24. Server directory? `pub/OpenBSD/7.5/amd64`
+25. Set names? `done`
+26. Drink some coffee while it verifies (depends on network speed)
+27. Location of sets? `done`
+28. Congrats!
+29. Reboot and remove USB device
+
+## First Boot Tweaks
+
+### User Permissions
+
+Before we do anything, we should give our main user full access via `doas`. Login as `root` and run the following:
+
+ echo "permit nopass :wheel" >> /etc/doas.conf
+
+Now you can logout or reboot the machine.
+
+Running any of the commands might present you with a permissions error. If that happens, simply add `doas` to the start of every command.
+
+### Firmware
+
+Once your machine reboots, login as your created user. The next steps will help you ensure you have the latest firmware.
+
+Simply run the command: `fw_update`
+
+
+### WiFi
+
+To enable wifi on your device, run the following command (filling in the proper details where need be)
+
+ ifconfig iwn0 up
+ ifconfig iwn0 scan
+ echo "join WIFI-NAME wpakey PASSPHRASE" >> /etc/hostname.iwn0
+ echo "dhcp" >> /etc/hostname.iwn0
+ echo "inet6 autoconf" >> /etc/hostname.iwn0
+ echo "up powersave" >> /etc/hostname.iwn0
+ dhclient iwn0
+
+Take note of the `iwn0`, as this might differ on your machine. (You can check this by running `ifconfig`)
+
+You might also need to run `doas sh /etc/netstart` after.
+
+
+### Performance Boost
+
+This step is optional and targeted towards devices with batteries (obviously). Properly setup apmd:
+
+ rcctl enable apmd
+ rcctl set apmd flags -A
+ rcctl start apmd
+
+
+## Next Steps
+
+Now that the base system is up and running, it is time to setup our desktop environment:
+
+[Setting up a Desktop Environment for OpenBSD &rarr;](/wiki/openbsd/desktop_environment)
diff --git a/wiki/ps2.md b/wiki/ps2.md
new file mode 100644
index 0000000..bf8b752
--- /dev/null
+++ b/wiki/ps2.md
@@ -0,0 +1,10 @@
+---
+layout: page
+title: PS2
+permalink: /wiki/ps2
+---
+
+This page contains information about setting up PS2 hardware (and emulators) to work with online play.
+
+* [PCSX2](/wiki/ps2/pcsx2)
+* [Networking](/wiki/ps2/networking)
diff --git a/wiki/ps2_networking.md b/wiki/ps2_networking.md
new file mode 100644
index 0000000..1066520
--- /dev/null
+++ b/wiki/ps2_networking.md
@@ -0,0 +1,21 @@
+---
+layout: page
+title: PS2 Networking
+permalink: /wiki/ps2/networking
+---
+
+This page contains all the information to get up and running with online servers for PS2 games. The instructions below work for both stock hardware and emulators.
+
+## DNS Changes
+
+In the game settings (depending on the game) change your Primary DNS information to the following:
+
+ 45.7.228.197
+
+## Emulator Settings
+
+![Mac OS Settings](/public/images/Screenshot_2024-03-20_at_10.49.01__8239__AM.png)
+
+If you're finding things tricky, [this YouTube video is extremely helpful](https://www.youtube.com/watch?v=9uXjpkBNkCk).
+
+That's it!
diff --git a/wiki/ps2_pcsx2.md b/wiki/ps2_pcsx2.md
new file mode 100644
index 0000000..c32ec52
--- /dev/null
+++ b/wiki/ps2_pcsx2.md
@@ -0,0 +1,15 @@
+---
+layout: page
+title: PCSX2
+permalink: /wiki/ps2/pcsx2
+---
+
+This page contains details on setting up PCSX2 on MacOS.
+
+1. Download the Mac version of the emulator from: [https://pcsx2.net](https://pcsx2.net)
+2. Grab the PS2 BIOS file [here](https://www.retrostic.com/bios/pcsx2-playstation-2)
+3. Place this `ps2-bios` folder under `Library > Application Support > PCSX2 > bios`
+4. Open the application by right-clicking and selecting `Open` (avoids security issues)
+5. Select the `.bin` file with the USA flag
+6. Select your game directory. Grab game ROMs from [here](https://vimm.net/vault/?system=PS2) (For example, [Battlefront 2](https://vimm.net/vault/9362))
+7. Have fun!
diff --git a/wiki/qutebrowser.md b/wiki/qutebrowser.md
new file mode 100644
index 0000000..41effd0
--- /dev/null
+++ b/wiki/qutebrowser.md
@@ -0,0 +1,32 @@
+---
+layout: page
+title: Qutebrowser
+permalink: /wiki/qutebrowser
+---
+
+This page contains all the custom configuration for qutebrowser.
+
+### Greasemonkey
+
+All of these scripts should be added under `~/.local/share/qutebrowser/greasemonkey/`. Then be sure to run the proper command within qutebrowser: `:greasemonkey-reload`
+
+#### Auto Skip YouTube Ads
+
+ // ==UserScript==
+ // @name Auto Skip YouTube Ads
+ // @version 1.0.0
+ // @description Speed up and skip YouTube ads automatically
+ // @author jso8910
+ // @match *://*.youtube.com/*
+ // @exclude *://*.youtube.com/subscribe_embed?*
+ // ==/UserScript==
+ setInterval(() => {
+ const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button')
+ if (btn) {
+ btn.click()
+ }
+ const ad = [...document.querySelectorAll('.ad-showing')][0];
+ if (ad) {
+ document.querySelector('video').playbackRate = 10;
+ }
+ }, 50)
diff --git a/wiki/safari.md b/wiki/safari.md
new file mode 100644
index 0000000..1ada79f
--- /dev/null
+++ b/wiki/safari.md
@@ -0,0 +1,35 @@
+---
+layout: page
+title: Safari
+permalink: /wiki/safari
+---
+
+This page contains details on how to properly configure Safari for the best user experience.
+
+## Extensions
+
+To avoid being bombarded with tracking scripts and advertisements, you'll want to install the following Safari extensions:
+
+* [AdGuard](https://adguard.com/en/adguard-mac/overview.html)
+* [AdBlock](https://adblockplus.org/ad-blocker-safari)
+
+## Web Browsing QoL
+
+Display full links on hover (similar to default config for Firefox, Chrome):
+
+1. Open the `View` menu item
+2. Click `Show Status Bar`
+
+Display full URL address in open tabs:
+
+![Safari toggling ful adress URLs](/public/images/safari-full-address.png)
+
+## Custom CSS
+
+Include a "master" CSS file to override specific sites/elements with your own styling.
+
+1. Open Safari `Settings`
+2. Navigate to the `Advanced` tab
+3. Select your custom CSS file in the dropdown
+
+![Safari toggling ful adress URLs](/public/images/safari-settings-custom-css.png)
diff --git a/wiki/scripts.md b/wiki/scripts.md
new file mode 100644
index 0000000..cabd288
--- /dev/null
+++ b/wiki/scripts.md
@@ -0,0 +1,78 @@
+---
+layout: page
+title: Scripts
+permalink: /wiki/scripts
+---
+
+This page contains helpful scripts and useful terminal commands.
+
+## Docker
+
+Installing `ghost`
+
+
+ docker pull ghost
+ docker run -d \
+ --name ghost-name \
+ -e NODE_ENV=development \
+ -p 2368:2368 \
+ -v $HOME/path/to/ghost/blog:/var/lib/ghost/content \
+ ghost:alpine
+
+
+## `ffmpeg` to MP4
+
+
+ ffmpeg -i input_filename.avi -c:v copy -c:a copy -y output_filename.mp4
+
+
+## Mount USB HDD via CLI
+
+
+ mkdir /media/usb-drive
+ mount /dev/sdX /media/usb-drive/
+
+
+## Fix screen tearing
+
+
+ sudo vim /etc/X11/xorg.conf.d/20-intel.conf
+
+
+Add the following contents to `20-intel.conf`:
+
+
+ Section "OutputClass"
+ Identifier "Intel Graphics"
+ MatchDriver "i915"
+ Driver "intel"
+ Option "DRI" "3"
+ Option "TearFree" "1"
+ EndSection
+
+
+## Enabling "tap to click"
+
+
+ sudo micro /etc/X11/xorg.conf.d/30-touchpad.conf
+
+
+Add the following contents to `30-touchpad.conf`:
+
+
+ Section "InputClass"
+ Identifier "touchpad"
+ Driver "libinput"
+ MatchIsTouchpad "on"
+ Option "Tapping" "on"
+ Option "TappingButtonMap" "lmr"
+ EndSection
+
+
+## Woocommerce
+
+**Reset all product menu_order to `0`**
+
+
+ UPDATE wp_posts SET menu_order = 0 WHERE post_type = 'product';
+
diff --git a/wiki/sublime-text.md b/wiki/sublime-text.md
new file mode 100644
index 0000000..f72cc6f
--- /dev/null
+++ b/wiki/sublime-text.md
@@ -0,0 +1,51 @@
+---
+layout: page
+title: Sublime Text
+permalink: /wiki/sublime-text
+---
+
+Personal configuration for the text editor Sublime Text ([https://www.sublimetext.com/](sublimetext.com/))
+
+## Themes / Color Schemes
+
+* Theme: Default
+* Color scheme is set to `auto`:
+ * Light scheme: `Breakers`
+ * Dark scheme: `Dracula`
+
+## Plugins
+
+* BracketHighlighter
+* Copy Relative Path
+* Dracula Color Scheme
+* Emmet
+* Package Control
+
+## Settings
+
+
+ {
+ "ignored_packages":
+ [
+ "Vintage",
+ ],
+ "color_scheme": "auto",
+ "dark_color_scheme": "Packages/Dracula Color Scheme/Dracula.tmTheme",
+ "light_color_scheme": "Packages/Colorsublime - Themes/Butterfly.tmTheme",
+ "font_face": "JetBrains Mono NL",
+ "font_size": 14,
+ "line_padding_top": 3,
+ "line_padding_bottom": 3,
+ "highlight_line": true,
+ "word_wrap": true,
+ "dark_theme": "Default Dark.sublime-theme",
+ "light_theme": "Default.sublime-theme",
+ "tab_size": 2,
+ "theme": "auto",
+ "index_files": true,
+ "show_definitions": false,
+ "show_full_path": true,
+ /*"tab_size": 2,*/
+ "translate_tabs_to_spaces": true,
+ }
+
diff --git a/wiki/ubuntu.md b/wiki/ubuntu.md
new file mode 100644
index 0000000..563d620
--- /dev/null
+++ b/wiki/ubuntu.md
@@ -0,0 +1,89 @@
+---
+layout: page
+title: Ubuntu
+permalink: /wiki/ubuntu
+---
+
+This page contains a wide range of common scripts / application setups for Ubuntu
+
+## MongoDB 3.4 on Ubuntu 23.10
+
+ wget http://launchpadlibrarian.net/668089858/libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
+ sudo apt install ./libssl1.0.0_1.0.2n-1ubuntu5.13_amd64.deb
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
+
+ echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
+
+Now edit `/etc/apt/sources.list.d/mongodb-org-3.4.list`:
+
+ deb [trusted=yes] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4...
+
+Then finish things up:
+
+ sudo apt-get update --allow-unauthenticated
+ sudo apt-get install -y mongodb-org
+
+ sudo mkdir -p /data/db
+ sudo chmod -R 777 /data/db
+
+## Redis 6.0.7 on Ubuntu 23.10
+
+ sudo apt-get install build-essential tcl
+ cd /tmp
+ curl -O http://download.redis.io/releases/redis-6.0.7.tar.gz
+ tar xzvf redis-6.0.7.tar.gz
+ cd redis-6.0.7
+
+Install redis:
+
+ make
+ make test
+ sudo make install
+
+ sudo mkdir /etc/redis
+ sudo cp /tmp/redis-6.0.7/redis.conf /etc/redis
+
+Edit `/etc/redis/redis.conf` with the following changes:
+
+- `supervised systemd`
+- `dir /var/lib/redis`
+
+Create systemd unit file for redis: `/etc/systemd/system/redis.service`:
+
+ [Unit]
+ Description=Redis In-Memory Data Store
+ After=network.target
+
+ [Service]
+ User=redis
+ Group=redis
+ ExecStart=/usr/local/bin/redis-server /etc/redis/redis.conf
+ ExecStop=/usr/local/bin/redis-cli shutdown
+ Restart=always
+
+ [Install]
+ WantedBy=multi-user.target
+
+Final steps:
+
+ sudo adduser --system --group --no-create-home redis
+ sudo mkdir /var/lib/redis
+ sudo chown redis:redis /var/lib/redis
+ sudo chmod 770 /var/lib/redis
+
+## Ruby 2.7.2 with rbenv on Ubuntu 23.10
+
+Edit the `/etc/apt/sources.list` file:
+
+ deb [trusted=yes] http://security.ubuntu.com/ubuntu bionic-security main
+
+Then run `sudo apt-get update`. After completion, install `libssl1.0-dev`:
+
+ sudo apt-get install libssl1.0-dev
+
+Install `rbenv` and be sure to include the following in `.zshrc`:
+
+ export PATH="$HOME/.rbenv/bin:$PATH"
+ eval "$(rbenv init -)"
+
+
diff --git a/wiki/wordpress_NearlyFreeSpeech_Setup.md b/wiki/wordpress_NearlyFreeSpeech_Setup.md
new file mode 100644
index 0000000..4957726
--- /dev/null
+++ b/wiki/wordpress_NearlyFreeSpeech_Setup.md
@@ -0,0 +1,162 @@
+---
+layout: page
+title: WordPress Setup on NearlyFreeSpeech
+permalink: /wiki/wordpress/NearlyFreeSpeech_Setup/
+---
+
+## Installing WordPress on NearlyFreeSpeech
+
+### Download WordPress
+
+We will use the `wp-cli` that comes packaged with NearlyFreeSpeech (NFS):
+
+1. Connect to your site via SSH.
+2. Change to the directory you want to be the base of your blog (e.g. /home/public if WordPress will be running the whole site, or /home/public/blog if you want to share the site with other content).
+
+For help using WP-CLI from the SSH command line, use this command:
+
+ wp help
+
+To download and unpack the latest version of WordPress, enter the following command:
+
+ wp core download
+
+## Create a MySQL Process and Database
+
+Follow the instructions in the NearlyFreeSpeech.NET FAQ to [create a MySQL process](https://members.nearlyfreespeech.net/faq?q=MySQL#MySQL) if you haven't already.
+
+Next, [create a new database](https://members.nearlyfreespeech.net/faq?q=CreateDatabase#CreateDatabase) within that process. Note the name of the process and the name of the database.
+
+**Important**: Do not use your own MySQL credentials to connect WordPress to your database. Instead, create a new user. This will protect your member password in the event that your site becomes compromised.
+
+
+- Click on the [MySQL tab](https://members.nearlyfreespeech.net/mysql) in the member interface
+- Click "[Open phpMyAdmin](https://phpmyadmin.nearlyfreespeech.net/" in the Actions box.
+- Enter the DSN ("Server") of your MySQL Process, MySQL username, and MySQL password. The DSN and username can be found on the Process Information page in our member UI.
+- Click on the "Users" tab.
+- Click "Add user." (It's toward the bottom left of the page.)
+- Give the user a descriptive name. We'll use exampledbuser here, but you should pick something better, like wpuser or something representative of your blog.
+- Make sure to leave the Host: selectbox on "Any host."
+- Click the "Generate" link to generate a nice strong password.
+- Use cut and paste to copy the new password somewhere, you'll need it later. (We'll use dbpassword here.)
+- Grant the following permissions to the new user:
+ - All the permissions except "file" in the "data" box,
+ - Everything in the "structure" box, and
+ - "LOCK TABLES" in the "administration" box.
+- Click the "Go" button in the lower right.
+- Exit phpMyAdmin.
+
+## Generate a WordPress Configuration File
+
+At the SSH command line (replace the examples with the info for the database and user you created above):
+
+ wp core config --dbhost=example.db --dbname=exampledb --dbuser=exampledbuser --dbpass=dbpassword
+ chmod 644 wp-config.php
+
+## Run the WordPress Installation and Setting Permissions
+
+To get your permalinks to work properly, you must set up an .htaccess file.
+
+
+1. Go to the Dashboard for your WordPress site. (e.g. https://www.example.com/wp-admin/index.php)
+2. In the navigation sidebar, find Settings and, under that, Permalinks.
+3. Select your preferred link style under "Common Settings." (We like "Day and name.")
+4. Scroll down and select the "Save Changes" button.
+
+Next, create an `.htaccess` file for your WordPress site. We suggest doing this directly from the SSH command line using the cat shell command:
+
+ cat >.htaccess <<NFSNRULES # This line is a shell command, not part of .htaccess!
+ RewriteEngine On
+ RewriteBase /
+ RewriteRule ^index\.php$ - [L]
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule . /index.php [L]
+ NFSNRULES
+
+If you prefer, you can copy-paste the text into an editor:
+
+ RewriteEngine On
+ RewriteBase /
+ RewriteRule ^index\.php$ - [L]
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteRule . /index.php [L]
+
+We need to run the following commands in order to install, uninstall, activate, and deactivate plugins/themes from within the admin web GUI of WordPress:
+
+ chgrp web .htaccess
+ chmod 664 .htaccess
+ chgrp -R web *
+ find . -type d -exec chmod 775 {} \;
+ find . -type f -exec chmod 664 {} \;
+ wp config set FS_METHOD direct
+
+## Enable File Uploading
+
+In your main WordPress installation folder enter the following SSH commands:
+
+ cd wp-content
+ mkdir -p uploads
+ chgrp -R web uploads
+ chmod -R 775 uploads
+
+## Keeping WordPress Up-To-Date Automatically via Command Line
+
+It is **critically** important to keep your WordPress installation up-to-date including, if applicable, your theme and plugins. PHP, WordPress, and WordPress themes and plugins all have a track record of security problems. Most of those get fixed quickly, but if you don't update, you don't get the fixes.
+
+To help you keep WordPress up-to-date, NFS provides a streamlined script.
+
+This command, which must be run from an interactive ssh session, will set up our system to check your WordPress install (and themes & plugins) for you every day, and update them automatically when needed:
+
+ wp-update.sh -a
+
+By default, it will tell you via email when updates happen. If you don't want that, just add `-q` (for "quiet") to the command. It will work silently unless there is an error.
+
+If you get errors from wp-cron (not wp-update) about failed automatic updates, you may also wish to add this to your wp-config.php file:
+
+ define( 'AUTOMATIC_UPDATER_DISABLED', true );
+
+This disables the insecure automatic updater bundled with recent versions of WordPress.
+
+**Do not attempt** to use WordPress's built-in ability to update itself through its admin panel. That insecure, outdated approach should not still exist. It does not work on NFS, which is a feature, not a bug. Getting it to work requires almost completely destroying your site's security, thereby ensuring that any undiscovered security flaw can enable hackers to completely obliterate your site. The update methods described here are faster, easier, and safer.
+
+## Logging In
+
+You should be able to navigate to `yourwebsite.com/wp-admin`, login and have everything work as expected. Congrats - enjoy your blog!
+
+Below you can find more advanced configuration to get the most out of your WordPress project.
+
+---
+
+## Backing up WordPress
+
+NFS recommends backing up your WordPress setup on a regular basis.
+
+This is a two-step process. You must back up both the files and the database.
+
+### Backing up WordPress Files
+
+To back up your WordPress files directly from a Unix-like system of your own, you can use a command like:
+
+ ssh yourmembername_siteshortname@ssh.phx.nearlyfreespeech.net tar -C /home/public -cvf - . | gzip >name-of-wordpress-backup.tar.gz
+
+To back up WordPress to a file on our system that you can transfer via SFTP to your own computer, you can use a command like:
+
+ tar -C /home/public -cvzf /home/tmp/name-of-wordpress-backup.tar.gz .
+
+This assumes that your WordPress install is in the default location (`/home/public`). It will put your backup file in your `/home/tmp` directory.
+
+Do not try to back up your WordPress folder into your WordPress folder, as that occasionally results in attempts to use infinite disk space by trying to back up the backup of the backup of the backup of the...
+
+### Backing up the WordPress Database
+
+If you have a Unix-like system of your own (e.g. macOS or Linux), you can do the backup directly from there using your local command prompt using the MySQL username and password you created for WordPress:
+
+ ssh yourmembername_siteshortname@ssh.phx.nearlyfreespeech.net wp db export - | gzip >wordpress-backup.sql.gz
+
+Or you can do it from the SSH command line via WP-CLI:
+
+ wp db export /home/tmp/wordpress-backup.sql
+
+The `wordpress-backup.sql` file this generates will be stored in your site's `/home/tmp` directory. Download it from there to have a local copy.
diff --git a/wiki/wordpress_database_update.md b/wiki/wordpress_database_update.md
new file mode 100644
index 0000000..c015c3d
--- /dev/null
+++ b/wiki/wordpress_database_update.md
@@ -0,0 +1,25 @@
+---
+layout: page
+title: WordPress Database Update
+permalink: /wiki/wordpress/database_update/
+---
+
+The following page contains a collection of scripts to update WordPress for numerous things.
+
+## Updating the URL of the Database
+
+ -- Replace in wp_options table
+ UPDATE wp_options SET option_value = REPLACE(option_value, 'example.com', 'example2.com') WHERE option_name = 'home' OR option_name = 'siteurl';
+
+ -- Replace in wp_posts table
+ UPDATE wp_posts SET post_content = REPLACE(post_content, 'example.com', 'example2.com');
+ UPDATE wp_posts SET guid = REPLACE(guid, 'example.com', 'example2.com');
+
+ -- Replace in wp_postmeta table
+ UPDATE wp_postmeta SET meta_value = REPLACE(meta_value, 'example.com', 'example2.com');
+
+ -- Replace in wp_usermeta table
+ UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, 'example.com', 'example2.com');
+
+ -- Replace in wp_users table
+ UPDATE wp_users SET user_url = REPLACE(user_url, 'example.com', 'example2.com');
diff --git a/wiki/xbox.md b/wiki/xbox.md
new file mode 100644
index 0000000..5a50268
--- /dev/null
+++ b/wiki/xbox.md
@@ -0,0 +1,9 @@
+---
+layout: page
+title: Xbox
+permalink: /wiki/xbox
+---
+
+This page contains all the details of my personal setup for the original Xbox console. This includes cleaning, repasting thermals, soft modding and more.
+
+* [Softmodding](/wiki/xbox/softmodding)
diff --git a/wiki/xbox_softmodding.md b/wiki/xbox_softmodding.md
new file mode 100644
index 0000000..9ef70d4
--- /dev/null
+++ b/wiki/xbox_softmodding.md
@@ -0,0 +1,28 @@
+---
+layout: page
+title: Xbox Softmodding
+permalink: /wiki/xbox/softmodding
+---
+
+This page details the instructions on how to soft mod an original Xbox console (v1.6 in this instance) using a USB flash drive.
+
+## Materials
+
+* A Female USB to Xbox controller port adapter
+* A USB flash drive that is 4GB or smaller
+* (Optional) If running MacOS, a working install of Windows via UTM
+
+## Preparing the USB Drive
+
+* Turn on your console and connect your USB drive via the controller port adapter
+* Navigate to `Memory` from the Xbox Dashboard
+* Select the device from the available options (WARNING: This is erase everything on the USB)
+* Remove the USB
+
+## Running the Exploit
+
+* Download the [Xbox Softmodding Tool.zip](https://drive.google.com/drive/folders/1Gs_yYVotDxAxtHZeHUVr_ts7KeMgqEmQ), open it, open the Softmod Package folder, and extract the contents of Endgame.zip. It should be a folder named `helper`, a folder named `trigger`, and a file called `payload.xbe`.
+* Copy the helper folder, trigger folder, and payload.xbe to the root of your flash drive or memory unit.
+* Plug the memory device into your controller and turn on the Xbox. Select "Memory", then click your memory device. It will freeze for a minute and then the LED ring on the front of your Xbox should cycle colors before booting into the softmod installer.
+* Press A to install the softmod. Read the prompts that come up and press A to acknowledge them. Your Xbox will reboot.
+* The tool will finish setting up. You will be left on the Xbox Softmodding Tool dashboard, which is just a skinned UnleashX dashboard. You can change the skin under System → Skins.