Skip to content

Instantly share code, notes, and snippets.

@the0neWhoKnocks
the0neWhoKnocks / Bash Scripting.md
Last active March 29, 2023 09:50
Bash Scripting

Bash Scripting


Shebang

#!/usr/bin/env bash
@the0neWhoKnocks
the0neWhoKnocks / Google Search Tips.md
Last active December 8, 2022 02:19
Google Search Tips

Google Search Tips


Exact Search

Wrap your search in double quotes

Limit Search by Domain

Prefix your search with site:

@the0neWhoKnocks
the0neWhoKnocks / Self Hosted Git Server.md
Last active October 4, 2021 20:31
Self Hosted Git Server

Self Hosted Git Server


Install on Portainer

  • Couldn't figure out how to use mounts with gogs (there was an odd mix of permissions being used), so you'll have to create some volumes instead.
    • Volumes > Add Volume (x2)
      Name: gogs-backup
      Name: gogs-data
      
@the0neWhoKnocks
the0neWhoKnocks / Arch Linux.md
Last active May 7, 2023 13:20
Arch Linux Install and Customization

Arch Linux Install and Customization


Live env. (booting Linux from a separate drive)

I use Ventoy to store multiple Linux imgs on one drive, with the ability to choose from a menu any distro I want.

At the time of writing, I used ventoy v1.0.52, and Arch Linux v2021.09.01.

Service Worker Notes


  • If you cache files during the installation phase, bandwidth and CPU will be shared while the cache is being filled since duplicate requests will go out for the assets being cached. Generally you'd want to wait for an event to be dispatched after the key parts of your App are loaded, then start caching files.
  • A general guideline for data storage is that URL addressable resources should be stored with the Cache interface, and other data should be stored with IndexedDB. For example HTML, CSS, and JS files should be stored in the cache, while JSON data should be stored in IndexedDB. Note that this is only a guideline, not a firm rule.
@the0neWhoKnocks
the0neWhoKnocks / Jenkins Groovy Notes.md
Created June 10, 2021 23:55
Jenkins / Groovy notes

Jenkins & Groovy Notes


Run a command in another Executor

sh 'echo "some text" >> "$WORKSPACE/file.log"'
// the file will end up in a second workspace, not the main one.

@the0neWhoKnocks
the0neWhoKnocks / manage multiple git accounts.md
Last active December 8, 2022 02:20
manage multiple git accounts
@the0neWhoKnocks
the0neWhoKnocks / GitHub Pages.md
Last active August 31, 2021 17:06
gh-pages, github pages, github workflow, github actions

GitHub Pages

Below are instructions on multiple ways in which a GitHub page can be set up.


Static Pages

This is the simplest approach if you have some static files in your repo like: