rj1
about | log | files | refs
commit 3d06324174155a8f48db2fba3aba4c64686f7ba2
author: rj1 <[email protected]>
date:   Tue,  6 Sep 2022 17:50:01 -0500

initial commit

Diffstat:
A.gitignore | 3+++
AREADME.md | 5+++++
Aconfig.toml | 33+++++++++++++++++++++++++++++++++
Acontent/_index.md | 5+++++
Acontent/about.md | 5+++++
Acontent/archives.md | 6++++++
Acontent/homepage/index.md | 3+++
Acontent/notes/fall-guys-linux.md | 109+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/notes/git-identities.md | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/notes/hosting-your-own-git-repos.md | 48++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/notes/install-arch-linux-full-disk-encryption.md | 249+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/notes/sniffing-android-app-traffic-genymotion-mitmproxy.md | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/notes/sway-on-void-linux-without-elogind.md | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Acontent/notes/void-install-notes.md | 190+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adeploy.sh | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Astatic/gpg.txt | 64++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Astatic/img/sshot1.png | 0
Astatic/img/sshot2.png | 0
Athemes/rj1/archetypes/default.md | 2++
Athemes/rj1/layouts/404.html | 0
Athemes/rj1/layouts/_default/baseof.html | 11+++++++++++
Athemes/rj1/layouts/_default/list.html | 17+++++++++++++++++
Athemes/rj1/layouts/_default/rss.xml | 39+++++++++++++++++++++++++++++++++++++++
Athemes/rj1/layouts/_default/single.html | 42++++++++++++++++++++++++++++++++++++++++++
Athemes/rj1/layouts/_default/term.html | 17+++++++++++++++++
Athemes/rj1/layouts/_default/terms.html | 20++++++++++++++++++++
Athemes/rj1/layouts/index.html | 21+++++++++++++++++++++
Athemes/rj1/layouts/partials/footer.html | 5+++++
Athemes/rj1/layouts/partials/head.html | 10++++++++++
Athemes/rj1/layouts/partials/header.html | 18++++++++++++++++++
Athemes/rj1/layouts/partials/paginator.html | 15+++++++++++++++
Athemes/rj1/layouts/shortcodes/callout.html | 5+++++
Athemes/rj1/layouts/shortcodes/table.html | 6++++++
Athemes/rj1/static/css/style.css | 547+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Athemes/rj1/static/favicon.svg | 2++
35 files changed, 1794 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,3 @@ +.hugo_build.lock +/public +/resources diff --git a/README.md b/README.md @@ -0,0 +1,5 @@ +# personal website + +source files for my website, currently located @ https://rj1.neocities.org + +the site is generated using hugo & stagit diff --git a/config.toml b/config.toml @@ -0,0 +1,33 @@ +baseURL = "https://rj1.neocities.org" +languageCode = "en-us" +defaultContentLanguage = "en" +title = "rj1" +theme = "rj1" +copyright = "rj1" +pygmentsstyle = "dracula" +pygmentscodefences = true +pygmentscodefencesguesssyntax = true + +[permalinks] + post = "/notes/:slug" + +[[menu.main]] +name = "home" +url = "/" +weight = 1 + +[[menu.main]] +name = "notes" +url = "/notes/" +weight = 2 + +[[menu.main]] +name = "repos" +url = "/repos/" +weight = 3 + +[[menu.main]] +name = "rss" +url = "/notes/index.xml" +weight = 4 + diff --git a/content/_index.md b/content/_index.md @@ -0,0 +1,5 @@ ++++ +title = "home" +author = "rj1" ++++ + diff --git a/content/about.md b/content/about.md @@ -0,0 +1,5 @@ +--- +title: about +--- + +nothing here yet diff --git a/content/archives.md b/content/archives.md @@ -0,0 +1,5 @@ +--- +date: 2019-05-28 +type: section +layout: "archives" +--- +\ No newline at end of file diff --git a/content/homepage/index.md b/content/homepage/index.md @@ -0,0 +1,3 @@ +--- +headless : true +--- diff --git a/content/notes/fall-guys-linux.md b/content/notes/fall-guys-linux.md @@ -0,0 +1,109 @@ +--- +title: fall guys on linux w/ epic overlay (no heroic) +date: "2022-08-12" +--- + +# install legendary + +install [legendary](https://github.com/derrod/legendary) w/ your favorite +package manager (can be installed w/ python's pip as well) + +```shell +sudo xbps-install legendary +``` + +# authenticate to legendary with your epic account + +```shell +legendary auth +``` + +# change legendary game dir + +I prefer the contents of my home directory to contain lowercase filenames, so I +changed the path where legendary installs games from the epic store. there's no +need to do this, but if you're following these notes do keep in mind that the +default location is `~/Games` rather than `~/games` + +edit `~/.config/legendary/config.ini` + +mine looks like: +``` +[Legendary] +disable_update_check=false +disable_update_notice=true +install_dir=/home/rj1/games +``` + +# install fall guys + +```shell +legendary install 0a2d9f6403244d12969e11da6713137b +``` + +# install the epic overlay + +```shell +legendary eos-overlay install --prefix ~/games/FallGuys/pfx/ +``` + +# copy eac + +```shell +cp ~/games/FallGuys/EasyAntiCheat/easyanticheat_x64.so \ + ~/games/FallGuys/FallGuys_client_game_Data/Plugins/x86_64/ +``` + +# modify FallGuys_client.ini + +change `~/games/FallGuys/FallGuys_client.ini` so it references the +`FallGuys_client_game.exe` + +mine looks like: +``` +TargetApplicationPath=FallGuys_client_game.exe +WorkingDirectory= +WaitForExit=0 +SkipEOS=0 +``` + +# install GE-Proton + +```shell +wget https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton7-29/GE-Proton7-29.tar.gz +mkdir -p ~/.steam/root/compatibilitytools.d/ +tar -xf ~/dl/GE-Proton7-26.tar.gz -C ~/.steam/root/compatibilitytools.d/ +``` + +# FallGuys.sh + +```shell +#!/bin/sh +PROTON_EAC_RUNTIME="$HOME/.steam/root/steamapps/common/Proton EasyAntiCheat Runtime/" \ +STEAM_COMPAT_CLIENT_INSTALL_PATH="$HOME/.steam/root/" \ +STEAM_COMPAT_DATA_PATH="$HOME/games/FallGuys/" \ +WINEESYNC=1 \ +WINEFSYNC=1 \ +legendary launch 0a2d9f6403244d12969e11da6713137b \ + --no-wine \ + --wrapper "'$HOME/.steam/root/compatibilitytools.d/GE-Proton7-29/proton' run" +``` + +chmod +x FallGuys.sh + +# steam + +launch steam and install *Proton* (latest) and *Proton EasyAntiCheat* runtime. +they'll be listed under the 'tools' section of the list (I believe it's set to +only list games by default) + +now you can *add a non-steam game* and select the FallGuys.sh script we made. +you should now be able to launch the game via that script from within steam. + +some internet posts say you need to have your steam account linked to your epic +account in order for this to work. I can't verify that because in my case the +accounts were already linked. I would have liked to try it w/o the accounts +being linked to see if that's true or not. + +have fun! + diff --git a/content/notes/git-identities.md b/content/notes/git-identities.md @@ -0,0 +1,64 @@ +--- +title: manage separate git identities +date: "2022-07-03" +--- + +if you work on a lot of different projects using git, it can be tricky to manage +identities and easy to mistakenly make commits w/ your default user information. +creating a simple git alias for managing git identities can help. + +first, configure git so each repository requires its own user configuration in +order to make commits + +```shell +git config --global user.useConfigOnly true +``` + +now, set up an `id` alias in your `.gitconfig` file + +``` +[alias] + id = "!f() { \ + git config user.name \"$(git config user.$1.name)\"; \ + git config user.email \"$(git config user.$1.email)\"; \ + if [[ $(git config user.$1.signingkey) ]]; then \ + git config user.signingkey \"$(git config user.$1.signingkey)\"; \ + git config commit.gpgsign true; \ + else \ + git config --unset user.signingkey; \ + git config --unset commit.gpgsign; \ + fi; \ + if [[ $(git config user.$1.sshkey) ]]; then \ + git config core.sshCommand \"ssh -i $HOME/.ssh/$(git config user.$1.sshkey)\"; \ + else \ + git config --unset core.sshCommand; \ + fi \ + }; f" +``` + +now you're able to set up individual git identities, for example: + +```shell +git config --global user.rj1.name "rj1" +git config --global user.rj1.email "[email protected]" +git config --global user.rj1.signingkey "F042A0B6CB41FDA2" +git config --global user.rj1.sshkey "rj1" +``` + +signingkey is the gpg fingerprint to be used, sshkey is the name of a private +ssh key file stored in ~/.ssh. e.g. `~/.ssh/rj1`. gpg/ssh keys are optional. + +now when you're working in a git repo and try to commit something, it won't work +until you've chosen an identity to be used for that specific repository. this +can be done using the git alias we've just created: + +``` +git id rj1 +``` + +now the commits you make in that repo will be using that identity. + +you can add as many identities as you'd like. + +have fun! + diff --git a/content/notes/hosting-your-own-git-repos.md b/content/notes/hosting-your-own-git-repos.md @@ -0,0 +1,48 @@ +--- +title: host your own git repos +date: "2022-07-02" +--- + +requirements: +- git +- nginx +- fcgiwrap + +## create a user for git + +```shell +useradd git +``` + +## basic nginx config + +``` +server { + listen 80; + server_name git.yrdomain.org + root /home/git; + error_log /home/git/error.log; + access_log /home/git/access.log; + + location ~ (/.*) { + fastcgi_pass unix:/var/run/fcgiwrap.socket; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME /usr/lib/git-core/git-http-backend; + fastcgi_param GIT_HTTP_EXPORT_ALL ""; + fastcgi_param GIT_PROJECT_ROOT /home/git; + fastcgi_param PATH_INFO $1; + } + +} +``` + +## create repos in `/home/git` + +```shell +git init --bare reponame.git +cd reponame.git +``` + +w/ this very basic setup the git repo is shared publicly via http. you can configure basic http auth using nginx and push to the repo w/ http, but I prefer using ssh to push. + +have fun! diff --git a/content/notes/install-arch-linux-full-disk-encryption.md b/content/notes/install-arch-linux-full-disk-encryption.md @@ -0,0 +1,249 @@ +--- +title: arch linux installation notes +date: "2021-05-16" +lastmod: "2022-06-18" +--- + +install information: +- systemd-boot +- luks encryption +- zen kernel +- sway + +## verify we booted via efi + +{{< highlight shell >}} +ls /sys/firmware/efi/efivars +{{< / highlight >}} + +if this command shows the directory without error, proceed + +## system clock + +```shell +timedatectl set-ntp true +``` + +## partitioning + +| partition | size | code | fs | +-------------------|-----------|------|------| +| boot (/dev/sda1) | 512.0 MiB | ef00 | efi | +| root (/dev/sda2) | the rest | 8300 | ext4 | + +## create encrypted root partition + +```shell +cryptsetup luksFormat /dev/sda2 +cryptsetup open /dev/sda2 cryptroot +mkfs.ext4 /dev/mapper/cryptroot +mount /dev/mapper/cryptroot /mnt +``` + +## create boot partition + +```shell +mkfs.fat -F32 /dev/sda1 +mkdir /mnt/boot +mount /dev/sda1 /mnt/boot +``` + +## install base arch system + +```shell +pacstrap /mnt base linux-zen linux-zen-headers linux-firmware sudo neovim +``` +## generate fstab file + +```shell +genfstab -U /mnt /mnt/etc/fstab +``` + +## chroot into your fresh install + +```shell +arch-chroot /mnt +``` + +## set timezone + +```shell +ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime +hwclock --systohc +``` + +## locale + +```shell +echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen +locale-gen +localectl set-locale LANG=en_US.UTF-8 +``` + +## basic network configuration + +```shell +echo "myhostname" > /etc/hostname +``` + +modify `/etc/hosts` + +``` +127.0.0.1 localhost +127.0.1.1 myhostname.localdomain myhostname +``` + +replace `myhostname` with whatever you like + +create `/etc/systemd/network/20-wired.network` + +``` +[Match] +Name=enp3s0 + +[Network] +DHCP=yes +DNS=1.1.1.1 +DNS=1.0.0.1 + +[DHCP] +UseDNS=false +``` + +edit `/etc/systemd/resolved.conf` to change dns client settings + +make sure software that relies on resolv.conf works + +```shell +ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf +``` + +```shell +systemctl enable systemd-networkd systemd-resolved +``` + +## mkinitcpio configuration + +modify `/etc/mkinitcpio.conf`, add 'encrypt' to hooks + +``` +HOOKS=(base udev autodetect modconf block filesystems keyboard encrypt fsck) +``` + +## generate initramfs + +```shell +mkinitcpio -P +``` + +## set root passwd + +```shell +passwd +``` + +## patch cpu microcode + +install either `amd-ucode` or `intel-ucode` depending on your system's cpu + +```shell +pacman -S intel-ucode +``` + +## software + +```shell +pacman -S sudo base-devel zsh git yadm openssh tmux pass wireguard-tools sway \ +waybar alacritty noto-fonts-cjk noto-fonts-emoji swappy weechat libnotify mako \ +notmuch mitmproxy oath-toolkit qrencode zbar grim slurp wf-recorder fzf swaybg \ +wl-clipboard swayidle firefox chromium ncmpcpp php python ruby ruby-docs foot \ +nmap bc mpd mpc ncmpcpp ripgrep fd qt5-wayland qt6-wayland mpv resolvconf \ +wireplumber pipewire pipewire-jack pipewire-alsa pipewire-pulse alsa-utils bat \ +man-db netcat rsync hugo isync msmtp w3m alot newsboat jq zathura zathura-pdf-mupdf +``` + +## enable seat service +systemctl enable seatd + +## create user + +```shell +useradd -m -G wheel,seat -s /bin/zsh rj1 +passwd rj1 +``` + +## sudo + +```shell +echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers +su rj1 +``` + +## more software +```shell +git clone https://aur.archlinux.org/paru-bin.git +cd paru +makepkg -si +paru -S tessen rofi-lbonn-wayland pinentry-rofi pass-coffin pass-otp vimiv-qt \ +nerd-fonts-hack swaylock-effects-git nnn-nerd nvm dict dstask wob tomb +``` + +```shell +yadm clone https://git.sr.ht/~rj1/dotfiles +source $HOME/.config/zsh/.zprofile +git clone https://github.com/sindresorhus/pure.git $XDG_CONFIG_HOME/zsh/pure +git clone https://github.com/zsh-users/zsh-autosuggestions.git $XDG_CONFIG_HOME/zsh/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $XDG_CONFIG_HOME/zsh/zsh-syntax-highlighting +nvm install --lts +``` + +## enable services + +```shell +systemctl --user enable pipewire pipewire-pulse wob.socket +``` + +## bootloader + +### install systemd-boot + +```shell +bootctl install +``` + +### create `/boot/loader/entries/arch.conf` + +```shell +title arch +linux /vmlinuz-linux-zen +initrd /intel-ucode.img +initrd /initramfs-linux-zen.img +options cryptdevice=UUID=UID-GOES-HERE:cryptroot root=/dev/mapper/cryptroot rw +``` + +`:r!blkid /dev/sda2 -sUUID -ovalue` in vim to insert the desired UUID + +### modify `/boot/loader/loader.conf` + +```shell +default arch.conf +timeout 2 +console-mode max +modifyor no +``` + +### review boot config + +```shell +bootctl list +``` + +## reboot + +``` +exit +reboot +``` + +have fun! + diff --git a/content/notes/sniffing-android-app-traffic-genymotion-mitmproxy.md b/content/notes/sniffing-android-app-traffic-genymotion-mitmproxy.md @@ -0,0 +1,78 @@ +--- +title: sniffing android app traffic w/ genymotion + mitmproxy + frida +date: "2021-05-17" +description: getting setup to sniff android app traffic w/ genymotion + mitmproxy +--- + +## requirements + +- virtualbox +- genymotion +- mitmproxy +- frida +- android tools + +```shell +pacman -S virtualbox mitmproxy android-tools +``` +```shell +yay -S genymotion +``` +```shell +pip install Frida frida-tools +``` +## launch genymotion and create an android vm + +select 'bridge' network mode when creating the vm in genymotion + +## launch mitmproxy on the host machine + +## enable the proxy on android +```shell +adb shell settings put global http_proxy <ip>:<port> +``` +the default port for mitmproxy is 8080 + +if you want to disable the proxy, use the following: +```shell +adb shell settings put global http_proxy :0 +``` + +## install your mitmproxy ssl certificate on android + +on the android vm, browse to `mitm.it`, download the certificate for android, and install it via android settings (this is a bit different in each version of android) + +note: you can do this via adb, but I find it to be more tedious + +now you should be able to inspect all of the https traffic from your android device in mitmproxy, but some apps use certificate pinning. there are a few ways around this, I like using [frida](https://frida.re/) + +magisk is a solution as well but it requires a more specific android environment, and is more tedious to use + +## check the cpu arch of your android vm (likely x86) +```shell +adb shell getprop ro.product.cpu.abi +``` +## download/install/run frida server on the android vm + +head to https://github.com/frida/frida/releases and find frida-server for your vm's architecture + +```shell +wget https://github.com/frida/frida/releases/download/14.2.18/frida-server-14.2.18-android-x86.xz +xz -d frida-server-14.2.18.xz +adb push frida-server-14.2.18 /data/local/tmp/frida-server +adb shell chmod 755 /data/local/tmp/frida-server +adb shell /data/local/tmp/frida-server & +``` +## list running processes on your vm +```shell +frida-ps -U -a +``` +## inject code into a specific process +```shell +frida -U -f com.process.name -l ssl.js -–no-pause +``` +you can find various examples for this over @ https://codeshare.frida.re + +e.g. https://codeshare.frida.re/@sowdust/universal-android-ssl-pinning-bypass-2/ + +have fun! diff --git a/content/notes/sway-on-void-linux-without-elogind.md b/content/notes/sway-on-void-linux-without-elogind.md @@ -0,0 +1,91 @@ +--- +title: sway on void linux without elogind +date: "2022-08-14" +--- + +these notes don't cover configuring sway, your terminal, etc. this is simple a +a barebones breakdown of getting sway running w/ seat management and dbus. + +install information: +- amd gpu +- sway +- dbus +- seatd + +# install seatd + +```shell +sudo xbps-install seatd +sudo ln -s /etc/sv/seatd /var/service +sudo sv enable seatd +``` + +# add user to appropriate groups + +```shell +sudo usermod -aG _seatd,audio,video rj1 +``` + +# PAM module: pam_rundir + +on other operating systems leveraging systemd, the runtime directory is usually +created/managed by systemd-logind. since void linux does not use systemd, we'll +need to find another solution. I'd prefer not to use elogind, so the best +solution I've come across is pam_rundir. we're already using PAM so why not let +it manage our runtime directory as well? makes sense to me! + +install pam_rundir module + +```shell +sudo xbps-install pam_rundir +``` + +edit the file `/etc/pam.d/system-login`, adding: + +`-session optional pam_rundir.so` + +now you don't need to worry about *XDG_RUNTIME_DIR* not being set! + +I've recently come across +[dumb_runtime_dir](https://github.com/ifreund/dumb_runtime_dir) as well. I +*think* the only difference is that it doesn't delete the directory on logout, +while pam_rundir does. + +# dbus + +enable the dbus service + +```shell +sudo ln -s /etc/sv/dbus /var/service +sudo sv enable dbus +``` + +# install software + +```shell +sudo xbps-install mesa-dri sway +``` +# launch script + +at this point, you should logout and log back in to continue + +you should now be able to simply launch sway by doing + +```shell +dbus-run-session sway +``` + +but I like to set a fixed dbus session address. I created a launch script +called `startw` which consists of: + +```shell +#!/bin/zsh +dbus-daemon --session --nofork --nopidfile --address=$DBUS_SESSION_BUS_ADDRESS & +sway +# sway -V > /tmp/sway.log 2>&1 +``` + +DBUS_SESSION_BUS_ADDRESS is set in my shell login profile already, but you +could set it in this launch script if you wanted to. + +have fun! diff --git a/content/notes/void-install-notes.md b/content/notes/void-install-notes.md @@ -0,0 +1,190 @@ +--- +title: void linux installation notes +date: "2022-07-08" +--- + +install information: +- luks encrypted +- ext4 filesystem +- no lvm +- chroot install (https://docs.voidlinux.org/installation/guides/chroot.html) + +# login + +root:voidlinux + +# interactive shell + +```shell +bash +``` + +# create partition table + +| partition | size | code | fs | +-------------------|-----------|------|------| +| boot (/dev/sda1) | 512 MiB | ef00 | efi | +| root (/dev/sda2) | the rest | 8300 | ext4 | + +# create filesystems + +```shell +cryptsetup luksFormat /dev/sda2 +cryptsetup open /dev/sda2 cryptroot +mkfs.ext4 /dev/mapper/cryptroot +mount /dev/mapper/cryptroot /mnt + +mkfs.fat -F32 /dev/sda1 +mkdir /mnt/boot +mount /dev/sda1 /mnt/boot +``` + +# mount linux system + +```shell +mkdir /mnt/dev && mount --rbind /dev /mnt/dev +mkdir /mnt/proc && mount --rbind /proc /mnt/proc +mkdir /mnt/sys && mount --rbind /sys /mnt/sys +``` + +or + +```shell +for d in dev proc sys; do mkdir /mnt/$d && mount --rbind /$d /mnt/$d; done +``` + +# install void base-system + +```shell +xbps-install -Sy -R https://repo-fi.voidlinux.org/current -r /mnt base-system cryptsetup grub-x86_64-efi neovim +``` + +# copy resolv.conf so dns works in the chroot + +```shell +cp /etc/resolv.conf /mnt/etc/resolv.conf +``` + +# chroot + +```shell +chroot /mnt /bin/bash +``` + +# set root password + +```shell +passwd +``` + +# root permissions + +```shell +chown root:root / +chmod 755 / +``` + +# set hostname + +```shell +echo <yr-hostname> > /etc/hostname +``` + +# add user +```shell +useradd -m -G wheel rj1 +passwd rj1 +``` + +# enable sudo + +```shell +nvim /etc/sudoers +``` + +# set timezone/keymap + +```shell +nvim /etc/rc.conf +``` + +# set locale + +```shell +echo "LANG=en_US.UTF-8" > /etc/locale.conf +``` + +uncomment your locale in `/etc/default/libc-locales` + +```shell +nvim /etc/default/libc-locales +``` + +# enable nonfree repo + install microcode patch + +```shell +xbps-install -S void-repo-nonfree +xbps-install -S intel-ucode +``` + +# setup fstab + +```shell +nvim /etc/fstab +``` + +example fstab: + +``` +tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 +UUID=21b8b8e9-29ca-4d2f-a7fc-3face2fc2b0a / ext4 defaults 0 0 +UUID=0536-48CF /boot vfat defaults 0 2 +``` + +use `:r!blkid /dev/sda2 -sUUID -ovalue` in vim to insert the desired UUID + +# edit grub config + +edit `/etc/default/grub` + +```shell +nvim /etc/default/grub +``` + +append `rd.auto=1` to GRUB_CMDLINE_LINUX_DEFAULT + +e.g. `GRUB_CMDLINE_LINUX_DEFAULT="loglevel=4 rd.auto=1"` + +# install grub + +```shell +grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id="void" +grub-mkconfig -o /boot/grub/grub.cfg +``` + +# add cryptsetup to our initramfs + +```shell +echo 'add_dracutmodules+=" crypt "' > /etc/dracut.conf.d/dracutmodules.conf +``` + +# add hostonly setting to dracut + +```shell +echo 'hostonly=yes' > /etc/dracut.conf.d/hostonly.conf +``` + +# build initramfs + +note: the following command will reconfigure all of the packages you have +installed, this is a simple way to generate the initramfs and enable our locale +choice(s) by reconfiguring the `glibc-locales` package + +```shell +xbps-reconfigure -fa +``` + +you can `exit` the chroot and `reboot` now + +have fun! + diff --git a/deploy.sh b/deploy.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +# todo: +# - check if repos have description/url files +# - generate url file + +sitewebroot=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd) +reposwebroot=$sitewebroot/static/repos + +if [[ -d "$reposwebroot" ]]; then + rm -rf "$reposwebroot" + mkdir "$reposwebroot" +fi + +# list of repos +declare -A repos +repos[dotfiles]=$HOME/.local/share/yadm/repo.git +repos[acro]=$HOME/playground/acro +repos[stagit]=$HOME/playground/stagit +repos[post_image]=$HOME/playground/post_image +repos[maildir]=$HOME/playground/maildir +repos[znc-oneway-relay]=$HOME/playground/znc-oneway-relay +repos[dopewars-irc]=$HOME/playground/dopewars-irc + +# generate html for each repo +args="" +for name in "${!repos[@]}"; do + basename=$(basename ${repos[$name]}) + + if [[ $name != $basename ]]; then + mkdir -p $HOME/tmp + cp -rf "${repos[$name]}" "$HOME/tmp/$name" + repos[$name]=$HOME/tmp/$name + fi + + dir="$reposwebroot/$name" + mkdir -p "$dir" + cd "$dir" + stagit ${repos[$name]} + + # repo index + if [ -f "about.html" ]; then + ln -sf "about.html" "index.html" + else + ln -sf "files.html" "index.html" + fi + + args+="${repos[$name]} " +done + +cd $reposwebroot +stagit-index $args > index.html + +# generate the rest of the site +cd $sitewebroot +hugo --minify + +# upload +neocities push --include-hidden --prune public + +rm -rf public +rm -rf $reposwebroot +rm -rf $HOME/tmp + diff --git a/static/gpg.txt b/static/gpg.txt @@ -0,0 +1,64 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +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 +=q1de +-----END PGP PUBLIC KEY BLOCK----- + diff --git a/static/img/sshot1.png b/static/img/sshot1.png Binary files differ. diff --git a/static/img/sshot2.png b/static/img/sshot2.png Binary files differ. diff --git a/themes/rj1/archetypes/default.md b/themes/rj1/archetypes/default.md @@ -0,0 +1,2 @@ ++++ ++++ diff --git a/themes/rj1/layouts/404.html b/themes/rj1/layouts/404.html diff --git a/themes/rj1/layouts/_default/baseof.html b/themes/rj1/layouts/_default/baseof.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> + {{- partial "header.html" . -}} + <body> + <div class="content"> + {{- partial "head.html" . -}} + {{- block "main" . }}{{- end }} + {{- partial "footer.html" . -}} + </div> + </body> +</html> diff --git a/themes/rj1/layouts/_default/list.html b/themes/rj1/layouts/_default/list.html @@ -0,0 +1,17 @@ +{{ define "main" }} +{{ if isset .Data "Term" }} +<h1>Entries tagged - "{{ .Data.Term }}"</h1> +{{ else }} +<h1 class="page-title">notes</h1> +{{ end }} + +<ul class="posts"> + {{- range .Data.Pages -}} + {{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}} + <li class="post"> + <a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date | lower }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span> + </li> + {{- end -}} + {{- end -}} +</ul> +{{ end }} diff --git a/themes/rj1/layouts/_default/rss.xml b/themes/rj1/layouts/_default/rss.xml @@ -0,0 +1,39 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }} +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>rj1's notes</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss> diff --git a/themes/rj1/layouts/_default/single.html b/themes/rj1/layouts/_default/single.html @@ -0,0 +1,42 @@ +{{ define "main" }} +<main> + <article> + <div class="title"> + <h1 class="title">{{ .Title }}</h1> + {{ if .Date }} + <div class="meta"> + posted on {{ dateFormat "Jan 2, 2006" .Date | lower }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }} + {{ if .Lastmod }} + {{ if ne .Lastmod .Date }} + - last updated on {{ dateFormat "Jan 2, 2006" .Lastmod | lower }} + {{ end }} + {{ end }} + </div> + {{ end }} + </div> + {{ if isset .Params "tldr" }} + <div class="tldr"> + <strong>tl;dr:</strong> + {{ .Params.tldr }} + </div>{{ end }} + + <section class="body"> + {{ .Content }} + </section> + + <div class="post-tags"> + {{ if ne .Type "page" }} + {{ if gt .Params.tags 0 }} + <nav class="nav tags"> + <ul class="tags"> + {{ range .Params.tags }} + <li><a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}">{{ . }}</a></li> + {{ end }} + </ul> + </nav> + {{ end }} + {{ end }} + </div> + </article> +</main> +{{ end }} diff --git a/themes/rj1/layouts/_default/term.html b/themes/rj1/layouts/_default/term.html @@ -0,0 +1,17 @@ +{{ define "main" }} +{{ if isset .Data "Term" }} +<h1>Entries tagged - "{{ .Data.Term }}"</h1> +{{ else }} +<h1 class="page-title">All articles</h1> +{{ end }} + +<ul class="posts"> + {{- range .Data.Pages -}} + {{- if (not (in (.Site.Params.excludedTypes | default (slice "page")) .Type)) -}} + <li class="post"> + <a href="{{ .RelPermalink }}">{{.Title}}</a> <span class="meta">{{ dateFormat "Jan 2, 2006" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</span> + </li> + {{- end -}} + {{- end -}} +</ul> +{{ end }} diff --git a/themes/rj1/layouts/_default/terms.html b/themes/rj1/layouts/_default/terms.html @@ -0,0 +1,20 @@ +{{ define "main" }} +<h1 class="page-title">All tags</h1> + +{{ $biggest := 1 }} +{{ $smallest := 1 }} +{{ $max := 3 }} +{{ $min := 1 }} +{{ $size := $min }} + +{{ $data := .Data }} +<div class="tag-cloud"> + <ul class="tags"> + {{ range $key, $value := .Data.Terms.ByCount }} + {{ $size := (add (mul (div $value.Count $biggest) (sub $max $min)) $min) }} + {{ $size := (cond (eq $biggest $smallest) $min $size) }} + <li><a style="font-size: {{ $size }}rem;" href="{{ $.Site.LanguagePrefix | absURL }}{{ $data.Plural }}/{{ $value.Name | urlize }}/">{{ $value.Name }}</a></li> + {{ end }} + </ul> +</div> +{{ end }} diff --git a/themes/rj1/layouts/index.html b/themes/rj1/layouts/index.html @@ -0,0 +1,21 @@ +<!DOCTYPE html> +<html> + {{ partial "header.html" . }} + <body> + <div class="content"> + {{ partial "head.html" . }} + <main class="list"> + <div class="site-description"> + {{- if isset .Site.Params "subtitle" -}} + <p>{{ .Site.Params.Subtitle | markdownify }}</p> + {{- end -}} + </div> + {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }} + {{ $paginator := .Paginate (where $pages "Params.hidden" "ne" true) }} + {{ template "partials/paginator.html" . }} + welcome to my public <a href="/notes">notebook</a> + </main> + {{ partial "footer.html" . }} + </div> + </body> +</html> diff --git a/themes/rj1/layouts/partials/footer.html b/themes/rj1/layouts/partials/footer.html @@ -0,0 +1,5 @@ +<footer> +<hr> +<div class="meta">「mail: <a href="mailto:[email protected]">[email protected]</a>」 「pgp: <a href="/gpg.txt">F0:42:A0:B6:CB:41:FD:A2</a>」</div> +</footer> + diff --git a/themes/rj1/layouts/partials/head.html b/themes/rj1/layouts/partials/head.html @@ -0,0 +1,10 @@ +<header> + <div class="main"> + <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a> + </div> + <nav> + {{ range .Site.Menus.main }} + <a href="{{ .URL }}">{{ .Name }}</a> + {{ end }} + </nav> +</header> diff --git a/themes/rj1/layouts/partials/header.html b/themes/rj1/layouts/partials/header.html @@ -0,0 +1,18 @@ +<head> + <meta charset="utf-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + {{- $title := ( .Title ) -}} + {{- $siteTitle := ( .Site.Title ) -}} + {{- if .IsHome -}} + <title>{{ $siteTitle }}</title> + {{- else -}} + <title>{{ $siteTitle }} > {{ $title | lower }}</title> + {{- end -}} + <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta property="og:image" content="{{ .Site.Params.og_image }}"/> + {{ with .OutputFormats.Get "rss" -}} + {{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} + {{ end -}} + <link rel="stylesheet" type="text/css" media="screen" href="/css/style.css" /> + <link rel="icon" href="/favicon.svg"> +</head> diff --git a/themes/rj1/layouts/partials/paginator.html b/themes/rj1/layouts/partials/paginator.html @@ -0,0 +1,15 @@ +{{ $pag := $.Paginator }} +{{ if gt $pag.TotalPages 1 }} +<ul class="pagination"> + <span class="page-item page-prev"> + {{ if $pag.HasPrev }} + <a {{ if $pag.HasPrev }}href="{{ $pag.Prev.URL }}"{{ end }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a> + {{ end }} + </span> + <span class="page-item page-next"> + {{ if $pag.HasNext }} + <a {{ if $pag.HasNext }}href="{{ $pag.Next.URL }}"{{ end }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a> + {{ end }} + </span> +</ul> +{{ end }} diff --git a/themes/rj1/layouts/shortcodes/callout.html b/themes/rj1/layouts/shortcodes/callout.html @@ -0,0 +1,5 @@ +<div class="callout"> + <div class="callout-inner"> + 💡 {{ .Get "text" }} + </div> +</div> diff --git a/themes/rj1/layouts/shortcodes/table.html b/themes/rj1/layouts/shortcodes/table.html @@ -0,0 +1,6 @@ +{{ $htmlTable := .Inner | markdownify }} +{{ $class := .Get 0 }} +{{ $old := "<table>" }} +{{ $new := printf "<table class=\"%s\">" $class }} +{{ $htmlTable := replace $htmlTable $old $new }} +{{ $htmlTable | safeHTML }} diff --git a/themes/rj1/static/css/style.css b/themes/rj1/static/css/style.css @@ -0,0 +1,547 @@ +html { + color: #232333; + font-family: monospace; + font-size: 15px; + line-height: 1.6em; +} + +body { + display: block; + margin: 8px; + color: white; + background-color: #1D2330; +} + +p { + line-height: 1.5; +} + +hr { + border: 0; + margin: 1em 0; +} + +blockquote { + border-left: 3px solid rebeccapurple; + color: #737373; + margin: 0; + padding-left: 1em; +} + +nav a, +a { + text-decoration: none; + border-bottom-style: solid; + border-bottom-width:1px; + border-bottom-color: #98c379; +} + +ul { + list-style: none; + padding-left: 2ch; +} + +ul li { + text-indent: -2ch; +} + +ul > li::before { + content: '* '; + font-weight: bold; +} + +.table-container { + overflow-x: scroll; + margin: 4px, 4px; + padding: 4px; + overflow-x: auto; + overflow-y: hidden; + white-space: nowrap; +} + +th td { + white-space: nowrap; + width: calc(50% - .5em); + display: inline-block; + overflow: auto; +} + +table { + width: 100%; +} + +table#files,#branches,#tags { + width: unset; +} + +table tr th { + background:#3e4452; + padding:0; + border: #111 solid 1px; + text-align: center; + font-weight: bold; +} + +table tr td { + border: none; +} + +a img { + border: 3px solid #ad69af; + max-width: 100%; +} + + +a:hover img { + border: 3px solid #98c379; +} + +figure { + box-sizing: border-box; + display: inline-block; + margin: 0; + max-width: 100%; +} + +figure img { + max-height: 500px; +} + +@media screen and (min-width: 600px) { + figure { + padding: 0 40px; + } +} + +figure h4 { + font-size: 1rem; + margin: 0; + margin-bottom: 1em; +} + +figure h4::before { + content: '↳ '; +} + +.highlight pre ::selection { + background: rgba(255, 255, 255, 0.2); + color: inherit; +} + +pre code { + background-color: #ad69af; + color: white; + color: inherit; + font-size: 100%; + padding: 0; +} + +.content { + margin-bottom: 4em; + margin-left: auto; + margin-right: auto; + max-width: 900px; + padding: 0 1ch; + word-wrap: break-word; +} + +header { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + margin: 1em 0; +} + +header .main { + font-size: 1.5rem; +} + +header a { + border: none; +} + +header nav a { + border-bottom-style: solid; + border-bottom-width:1px; + border-bottom-color: #98c379; +} + +footer a { + border: none; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-size: 1.2rem; +} + +footer { + margin-top: 1em; +} + +.title h1 { + margin-bottom: 0; +} + +time { + color: grey; +} + +.callout { + background-color: dodgerblue; + color: #fff; + padding: 1em; +} + +.callout p { + margin: 0; +} + +.callout a { + border-bottom: 3px solid #fff; +} + +.callout a:hover { + background-color: #fff; + color: dodgerblue; +} + +.site-description { + display: flex; + justify-content: space-between; +} + +.tags li::before { + content: "🏷 "; +} + +svg { + max-height: 15px; +} + +.draft-label { + text-decoration: none; + padding: 2px 4px; + border-radius: 4px; + margin-left: 6px; +} + +.highlight { + position: relative; + -webkit-overflow-scrolling: touch; +} + +.highlight pre code[class*="language-"] { + -webkit-overflow-scrolling: touch; +} + +.highlight pre code[class*="language-"]::before { + background: black; + border-radius: 0 0 0.25rem 0.25rem; + color: white; + font-size: 12px; + letter-spacing: 0.025rem; + padding: 0.1rem 0.5rem; + position: absolute; + right: 1rem; + text-align: right; + text-transform: uppercase; + top: 0; +} + +::-moz-selection { + background: #98c379; + color: #fff; + text-shadow: none; +} + +::selection { + background: #98c379; + color: #fff; + text-shadow: none; +} + +hr { + border-top: 3px dotted #8b8b97; +} + +code { + background-color: #ad69af; + color: white; + text-decoration: bold; + padding: 0.1em 0.2em; +} + +pre, #blob { + background-color: #282a36; + line-height: 1.4; + overflow-x: auto; + font-size: 0.9em; + padding: 10px; +} + +.line { + border: none; +} + +.A, +span.i, +pre a.i { + color: #98c379; +} + +pre a.i:hover { + color: #000; +} + +.D, +span.d, +pre a.d { + color: #fd5656; +} + +pre a { + border: none; +} + +blockquote { + border-color: #7a9f60; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + color: #ddd; +} + +h1::before { + color: #98c379; + content: "# "; +} + +h2::before { + color: #98c379; + content: "## "; +} + +h3::before { + color: #98c379; + content: "### "; +} + +h4::before { + color: #98c379; + content: "#### "; +} + +h5::before { + color: #98c379; + content: "##### "; +} + +h6::before { + color: #98c379; + content: "###### "; +} + +a { + color: inherit; +} + +a:hover { + background-color: #98c379; + color: black; +} + +.site-description a { + color: #ddd; +} + +.site-description a:hover { + color: black; +} + +.tags a:hover { + background-color: #98c379; + color: black; +} + +.site-title a { + color: white; + text-decoration: none !important; +} + +.header nav, +.footer { + border-color: #333; +} + +.soc { + margin-right: 5px; +} + +.soc:hover { + color: black; +} + +.clone { + color: grey; + font-size: 0.7em; + line-height: 0.8; + padding-bottom: 5px; +} + +.meta { + color: grey; +} + +.draft-label { + color: #98c379; + background-color: blue; +} + +.highlight pre code[class=language-javaScript]::before, +.highlight pre code[class="language-js"]::before { + content: "js"; + background: #f7df1e; + color: black; +} + +.highlight pre code[class*='language-yml']::before, +.highlight pre code[class*='language-yaml']::before { + content: 'yaml'; + background: #f71e6a; + color: white; +} + +.highlight pre code[class*='language-shell']::before, +.highlight pre code[class*='language-bash']::before, +.highlight pre code[class*='language-sh']::before { + content: 'shell'; + background: #ad69af; + color: white; +} + +.highlight pre code[class*='language-json']::before { + content: 'json'; + background: dodgerblue; + color: #000000; +} + +.highlight pre code[class*='language-python']::before, +.highlight pre code[class*='language-py']::before { + content: 'py'; + background: blue; + color: yellow; +} + +.highlight pre code[class*='language-css']::before { + content: 'css'; + background: cyan; + color: black; +} + +.highlight pre code[class*='language-go']::before { + content: 'Go'; + background: cyan; + color: royalblue; +} + +.highlight pre code[class*='language-md']::before, +.highlight pre code[class*='language-md']::before { + content: 'Markdown'; + background: royalblue; + color: whitesmoke; +} + +pre { line-height: 125%; } +td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } + +.hll { background-color: #ffffcc } +.c { color: #7f848e } /* comment */ +.err { color: #abb2bf } /* error */ +.esc { color: #abb2bf } /* escape */ +.g { color: #abb2bf } /* generic */ +.k { color: #c678dd } /* keyword */ +.l { color: #abb2bf } /* literal */ +.n { color: #e06c75 } /* name */ +.o { color: #56b6c2 } /* operator */ +.x { color: #abb2bf } /* other */ +.p { color: #abb2bf } /* punctuation */ +.ch { color: #7f848e } /* comment.hashbang */ +.cm { color: #7f848e } /* comment.multiline */ +.cp { color: #7f848e } /* comment.preproc */ +.cpf { color: #7f848e } /* comment.preprocfile */ +.c1 { color: #7f848e } /* comment.single */ +.cs { color: #7f848e } /* comment.special */ +.gd { color: #abb2bf } /* generic.deleted */ +.ge { color: #abb2bf } /* generic.emph */ +.gr { color: #abb2bf } /* generic.error */ +.gh { color: #abb2bf } /* generic.heading */ +.gi { color: #abb2bf } /* generic.inserted */ +.go { color: #abb2bf } /* generic.output */ +.gp { color: #abb2bf } /* generic.prompt */ +.gs { color: #abb2bf } /* generic.strong */ +.gu { color: #abb2bf } /* generic.subheading */ +.gt { color: #abb2bf } /* generic.traceback */ +.kc { color: #e5c07b } /* keyword.constant */ +.kd { color: #c678dd } /* keyword.declaration */ +.kn { color: #c678dd } /* keyword.namespace */ +.kp { color: #c678dd } /* keyword.pseudo */ +.kr { color: #c678dd } /* keyword.reserved */ +.kt { color: #e5c07b } /* keyword.type */ +.ld { color: #abb2bf } /* literal.date */ +.m { color: #d19a66 } /* literal.number */ +.s { color: #98c379 } /* literal.string */ +.na { color: #e06c75 } /* name.attribute */ +.nb { color: #e5c07b } /* name.builtin */ +.nc { color: #e5c07b } /* name.class */ +.no { color: #e06c75 } /* name.constant */ +.nd { color: #61afef } /* name.decorator */ +.ni { color: #e06c75 } /* name.entity */ +.ne { color: #e06c75 } /* name.exception */ +.nf { color: #61afef; font-weight: bold } /* name.function */ +.nl { color: #e06c75 } /* name.label */ +.nn { color: #e06c75 } /* name.namespace */ +.nx { color: #e06c75 } /* name.other */ +.py { color: #e06c75 } /* name.property */ +.nt { color: #e06c75 } /* name.tag */ +.nv { color: #e06c75 } /* name.variable */ +.ow { color: #56b6c2 } /* operator.word */ +.p-marker { color: #abb2bf } /* punctuation.marker */ +.w { color: #abb2bf } /* text.whitespace */ +.mb { color: #d19a66 } /* literal.number.bin */ +.mf { color: #d19a66 } /* literal.number.float */ +.mh { color: #d19a66 } /* literal.number.hex */ +.mi { color: #d19a66 } /* literal.number.integer */ +.mo { color: #d19a66 } /* literal.number.oct */ +.sa { color: #98c379 } /* literal.string.affix */ +.sb { color: #98c379 } /* literal.string.backtick */ +.sc { color: #98c379 } /* literal.string.char */ +.dl { color: #98c379 } /* literal.string.delimiter */ +.sd { color: #98c379 } /* literal.string.doc */ +.s2 { color: #98c379 } /* literal.string.double */ +.se { color: #98c379 } /* literal.string.escape */ +.sh { color: #98c379 } /* literal.string.heredoc */ +.si { color: #98c379 } /* literal.string.interpol */ +.sx { color: #98c379 } /* literal.string.other */ +.sr { color: #98c379 } /* literal.string.regex */ +.s1 { color: #98c379 } /* literal.string.single */ +.ss { color: #98c379 } /* literal.string.symbol */ +.bp { color: #e5c07b } /* name.builtin.pseudo */ +.fm { color: #56b6c2; font-weight: bold } /* name.function.magic */ +.vc { color: #e06c75 } /* name.variable.class */ +.vg { color: #e06c75 } /* name.variable.global */ +.vi { color: #e06c75 } /* name.variable.instance */ +.vm { color: #e06c75 } /* name.variable.magic */ +.il { color: #d19a66 } /* literal.number.integer.long */ diff --git a/themes/rj1/static/favicon.svg b/themes/rj1/static/favicon.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36"><path fill="#CCD6DD" d="M35 17c0 9.389-13.223 19-17 19-3.778 0-17-9.611-17-19S8.611 0 18 0s17 7.611 17 17z"/><path fill="#292F33" d="M13.503 14.845c3.124 3.124 4.39 6.923 2.828 8.485-1.562 1.562-5.361.297-8.485-2.828-3.125-3.124-4.391-6.923-2.828-8.485s5.361-.296 8.485 2.828zm8.994 0c-3.124 3.124-4.39 6.923-2.828 8.485 1.562 1.562 5.361.297 8.485-2.828 3.125-3.125 4.391-6.923 2.828-8.485-1.562-1.562-5.361-.297-8.485 2.828zM18 31c-2.347 0-3.575-1.16-3.707-1.293-.391-.391-.391-1.023 0-1.414.387-.387 1.013-.391 1.404-.01.051.047.806.717 2.303.717 1.519 0 2.273-.689 2.305-.719.398-.374 1.027-.363 1.408.029.379.393.38 1.011-.006 1.396C21.575 29.84 20.347 31 18 31z"/></svg> +\ No newline at end of file