Hello World from GitHub
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
#!/bin/bash | |
# do in tmp | |
cd /tmp | |
JETTY_FILE='jetty-distribution-9.3.3.v20150827.tar.gz' | |
JETTY_FOLDER=${JETTY_FILE:0:-7} | |
# Download | |
wget http://archive.eclipse.org/jetty/9.3.3.v20150827/dist/$JETTY_FILE | |
# Extract | |
sudo tar zxvf $JETTY_FILE -C /opt/ |
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
<script src="//unpkg.com/alpinejs" defer></script> | |
<div x-data="{ open: false, message: '🔥🔥🔥' }"> | |
<button @click="open = !open">Toggle</button> | |
<span x-show="open">Visible <strong x-text="message"></strong></span> | |
</div> |
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
<div | |
x-data="{ | |
search: '', | |
items: ['foo', 'bar', 'baz'], | |
get filteredItems() { | |
return this.items.filter( | |
i => i.startsWith(this.search) | |
) |
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
<script> | |
document.addEventListener('alpine:init', () => { | |
Alpine.store('darkMode', { | |
on: false, | |
toggle() { | |
this.on = ! this.on | |
} | |
}) | |
}) |