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
package main | |
import ( | |
"sort" | |
"time" | |
"github.com/mmcdole/gofeed" | |
) | |
// RSSEntry represents a single RSS entry. |
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
package main | |
import ( | |
"bytes" | |
"fmt" | |
"os" | |
"os/exec" | |
tea "github.com/charmbracelet/bubbletea" | |
"github.com/charmbracelet/lipgloss" |
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
131a132,145 | |
> func (m model) checkMinLen() error { | |
> var err error | |
> | |
> c := m.inputs[m.focused] | |
> if len(c.Value()) != c.CharLimit { | |
> err = fmt.Errorf( | |
> "%s should be at least %d characters", | |
> c.Value(), | |
> c.CharLimit, |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/charmbracelet/bubbles/key" | |
"github.com/charmbracelet/bubbles/textinput" | |
tea "github.com/charmbracelet/bubbletea" | |
"github.com/charmbracelet/lipgloss" |
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
# study stream aliases | |
# Requires https://github.com/caarlos0/timer to be installed. spd-say should ship with your distro | |
declare -A pomo_options | |
pomo_options["work"]="45" | |
pomo_options["break"]="10" | |
pomodoro () { | |
if [ -n "$1" -a -n "${pomo_options["$1"]}" ]; then | |
val=$1 |
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
package main | |
/* This gist shows a table bubble with custom styles and a special case | |
where the row will get highlighted red to show how to do conditional formatting*/ | |
import ( | |
"fmt" | |
"os" | |
"github.com/charmbracelet/bubbles/table" |
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
# I'll be doing another one for Linux, but this one will give you | |
# a pop up notification and sound alert (using the built-in sounds for macOS) | |
# Requires https://github.com/caarlos0/timer to be installed | |
# Mac setup for pomo | |
alias work="timer 60m && terminal-notifier -message 'Pomodoro'\ | |
-title 'Work Timer is up! Take a Break 😊'\ | |
-appIcon '~/Pictures/pumpkin.png'\ | |
-sound Crystal" |
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
module gh | |
go 1.19 | |
require ( | |
github.com/charmbracelet/bubbles v0.14.0 | |
github.com/charmbracelet/bubbletea v0.22.1 | |
) | |
require ( |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/charmbracelet/bubbles/list" | |
tea "github.com/charmbracelet/bubbletea" | |
"github.com/charmbracelet/lipgloss" | |
) |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/charmbracelet/bubbles/list" | |
tea "github.com/charmbracelet/bubbletea" | |
"github.com/charmbracelet/lipgloss" | |
) |
NewerOlder