This file contains hidden or 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
| brave-beta-history() { | |
| local cols sep brave_history open | |
| cols=$(( COLUMNS / 3 )) | |
| sep='{::}' | |
| if [ "$(uname)" = "Darwin" ]; then | |
| brave_history="$HOME/Library/Application Support/BraveSoftware/Brave-Browser-Beta/Default/History" | |
| open=open | |
| else | |
| brave_history="$HOME/.config/BraveSoftware/Brave-Browser-Beta/Default/History" |
This file contains hidden or 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
| fzf-history-exec() { | |
| local cmd | |
| if [[ -n "$ZSH_NAME" ]]; then | |
| cmd=$(fc -l 1 | fzf --tac | sed 's/^[[:space:]]*[0-9]\+[[:space:]]*//') | |
| else | |
| cmd=$(history | fzf --tac | sed 's/^[[:space:]]*[0-9]\+[[:space:]]*//') | |
| fi | |
| [[ -z "$cmd" ]] && return |
This file contains hidden or 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
| gist-copy() { | |
| gh gist list --limit 100 \ | |
| | fzf --preview 'gh gist view {1} --raw' \ | |
| | awk '{print $1}' \ | |
| | xargs gh gist view --raw \ | |
| | xclip -selection clipboard # Linux | |
| # | pbcopy # macOS | |
| } |
This file contains hidden or 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
| wtf() { | |
| local selected | |
| selected=$(wt list | fzf --ansi --header "Select worktree" --header-lines=1) | |
| if [[ -n "$selected" ]]; then | |
| local branch | |
| branch=$(echo "$selected" | awk '{print $2}') | |
| wt switch "$branch" | |
| fi | |
| } |
This file contains hidden or 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
| testingtesting |
This file contains hidden or 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
| [Desktop Entry] | |
| Version=1.0 | |
| Name=Firefox Developer Edition | |
| Comment=Firefox Developer Edition | |
| Exec=/opt/firefox-dev/firefox | |
| # Path=/opt/firefox-dev/firefox | |
| Icon=/opt/firefox-dev/browser/chrome/icons/default/default128.png | |
| Terminal=false | |
| Type=Application | |
| Categories=Browser;Development; |
This file contains hidden or 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
| const tree = { | |
| value: 1, | |
| children: [ | |
| { | |
| value: 10, | |
| children: [ | |
| { | |
| value: 2, | |
| }, | |
| ], |
This file contains hidden or 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
| mixin ga(id) | |
| script(async='', src='https://www.googletagmanager.com/gtag/js?id='+id) | |
| script. | |
| window.dataLayer = window.dataLayer || []; | |
| function gtag(){dataLayer.push(arguments);} | |
| gtag('js', new Date()); | |
| gtag('config', '!{id}') |
This file contains hidden or 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
| mixin svgIcon(iconId) | |
| i(class="icon icon--"+iconId) | |
| svg.icon__svg | |
| use(xlink:href='#'+iconId) |
This file contains hidden or 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
| mixin ga(id) | |
| //- Pass your ga id, as attribute, eg. +ga('yourid12345') | |
| script. | |
| window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date; | |
| ga('create', '!{id}', 'auto'); ga('set','transport','beacon'); ga('send', 'pageview') | |
| script(src='https://www.google-analytics.com/analytics.js') |