-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 77dd709
Showing
26 changed files
with
10,642 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
if [[ ! -d "/home/chun/repo/self-hosting" ]]; then | ||
echo "Cannot find source directory; Did you move it?" | ||
echo "(Looking for "/home/chun/repo/self-hosting")" | ||
echo 'Cannot force reload with this script - use "direnv reload" manually and then try again' | ||
exit 1 | ||
fi | ||
|
||
# rebuild the cache forcefully | ||
_nix_direnv_force_reload=1 direnv exec "/home/chun/repo/self-hosting" true | ||
|
||
# Update the mtime for .envrc. | ||
# This will cause direnv to reload again - but without re-building. | ||
touch "/home/chun/repo/self-hosting/.envrc" | ||
|
||
# Also update the timestamp of whatever profile_rc we have. | ||
# This makes sure that we know we are up to date. | ||
touch -r "/home/chun/repo/self-hosting/.envrc" "/home/chun/repo/self-hosting/.direnv"/*.rc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/nix/store/pqjxxdbiwch0fch4p4v5n0ly6mk242hi-nix-shell-env |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Deploy pages | ||
|
||
on: | ||
workflow_dispatch: {} | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 'lts/*' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Build | ||
run: npm run build -- --base /self-hosting/ | ||
|
||
- uses: actions/configure-pages@v4 | ||
|
||
- uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: dist | ||
|
||
- name: Deploy | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
direnv | ||
node_modules | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
To build slides, do | ||
|
||
```bash | ||
npm run build -- --base hackertools_materials/self-hosting | ||
``` | ||
|
||
Then, copy the `dist/` folder into the main subdirectory | ||
|
||
```bash | ||
cp -r dist/* .. | ||
``` | ||
|
||
> Note: This is buggy since slidev was not designed to work in subdirectories, stuff like download is broken. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const props = defineProps({ | ||
count: { | ||
default: 0, | ||
}, | ||
}) | ||
const counter = ref(props.count) | ||
</script> | ||
|
||
<template> | ||
<div flex="~" w="min" border="~ main rounded-md"> | ||
<button | ||
border="r main" | ||
p="2" | ||
font="mono" | ||
outline="!none" | ||
hover:bg="gray-400 opacity-20" | ||
@click="counter -= 1" | ||
> | ||
- | ||
</button> | ||
<span m="auto" p="2">{{ counter }}</span> | ||
<button | ||
border="l main" | ||
p="2" | ||
font="mono" | ||
outline="!none" | ||
hover:bg="gray-400 opacity-20" | ||
@click="counter += 1" | ||
> | ||
+ | ||
</button> | ||
</div> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[build] | ||
publish = "dist" | ||
command = "npm run build" | ||
|
||
[build.environment] | ||
NODE_VERSION = "18" | ||
|
||
[[redirects]] | ||
from = "/.well-known/*" | ||
to = "/.well-known/:splat" | ||
status = 200 | ||
|
||
[[redirects]] | ||
from = "/*" | ||
to = "/index.html" | ||
status = 200 |
Oops, something went wrong.