Monthly Shaarli
February, 2020
In this post, we’ll set up a demo site and tutorial for headless WordPress, including a starter template! We’ll use the WordPress dashboard for rich content editing, while migrating the front-end architecture to the JAMstack.
Setting up WLED on ESP8266
Ok, that took way longer than I expected but I now have a chronological history of my desks. I didn't realise until tonight that desk making was a hobby of mine.
I came across this exact issue while trying to come up with a solid set of flags to use with ctrlp in vim. I ended up settling on rg --hidden --glob '!.git'
which does what I want and, since it lives in my .vimrc, I don't mind the verbosity. I do think it's surprising to find rg searching through the .git directory but I can also understand the mental model of rg not wanting to be "git aware" or any other VCS for that matter.
A command-line journal that is distributed and encrypted, making it easy to jot notes :notebook: - schollz
a journal automatically formatting some information for keeping activities with friends in check
This is what I have been using for my todo list. If you use it, you should adjust the highlighting. This works for me using ConEmu on Windows 10...
A curated list of delightful productivity resources. - GintokiHub
A todo "plugin" for Vim, inspired by workflowy -- uses its own filetype; but maybe can be adapted to work in other filetypes
Using lua for configuring nvim instead of vimscript
from matrix+irc
hey y'all!
what's the most stable, resilient plugin for highlighting/completion/lsp
I've used so far coc.nvim and ALE and both combined but they don't perform very well comparing to VS code ecosystem
What do you folks use ?
mrassili joined the room.
mrassili
Hi
hey y'all!what's the most stable, resilient plugin for highlighting/completion/lspI've used so far coc.nvim and ALE and both combined but they don't perform very well comparing to VS code ecosystemWhat do you folks use ?
buu
coc
daz
what's your issue with coc? :^)
@jaawerth:matrix.org
I've had good experiences with both of the ones you've named. ALE's LSP support is more minimal but I've found coc requires a little elbow grease but is then hell on wheels
daz
also, what languages
@jaawerth:matrix.org
there's also the experimental LSP support in nvim 0.5.0 (aka master branch) + nvim-lsp but that's still a work in progress
(what's implemented thus far works welll though)
mrassili
I code mostly in React
combining JSX, js, CSSinJS code lacks support in both (in my experience)
@jaawerth:matrix.org
I haven't tried it in combination with CSSinJS but did you make sure to set the filetype to javascript.jsx or typescript.tsx (depending on whether you're using typescript)? iirc there's a note about that in coc-tsserver
buu
There's a vue language server that works pretty well
speaking of embedded stuff
mrassili
jaawerth looking into that
what about linting how do you handle that in coc?
@jaawerth:matrix.org
coc-eslint, which is a fork of vscode-eslint
assuming you're using eslint, which I am because there is no other linter that comes close in js these days ;-)
mrassili
using eslint
@jaawerth:matrix.org
coc has a pretty lush ecosystem of extensions that give you various LSP backends already tuned for coc integration and installable via :CocInstall, which is nice. you can also manually configure arbitrary LSP servers but the precooked integrations can save you some elbow grease
that's basically what nvim-lsp is - just a collection of presets + api glue for various LSP backends and install commands leveraging nvim 0.5.0's native lsp support
though coc goes further and crams in a bunch of stuff
mrassili
used them a bit and switched to ALE
@jaawerth:matrix.org
I do tend to prefer the way ALE provides linting feedback
mrassili
exactly
@jaawerth:matrix.org
in theory you could use both and just disable ALE's lsp support but I typically prefer minimizing the # of plugins if I can get similar functionality from both, and I just haven't bothered to find my optimal config that uses both together as of yet
clemons joined the room.
@jaawerth:matrix.org
and iirc there was an issue on getting ale and coc to play nice, something to do with the loclist
this https://github.com/dense-analysis/ale/issues/1945 you might be able to get around it by pointing one at the quickfix list and the other at the loclist but I didn't bother
ALE would clear location list that create from other plugin · Issue #1945 · dense-analysis/ale - GitHub
Information VIM version NVIM v0.3.2-462-gf2b555c9e Build type: Release Operating System: MacOS What went wrong https://github.com/w0rp/ale/blob/aa5c82b1718f44d04f6dd11bc63f6eeed2089d9d/autoload/ale...
I do like ALE's feedback better but if I'm going to use coc I am ok with its feedback in exchange for its other goodies
buu
What does ALE give you that coc doesn't?
daz
once i switched coc to use virtual text my linting life became nightmare^Wbetter
@jaawerth:matrix.org
buu: been a couple months since I've used ale but iirc it was just a ux thing in how it displayed the linter feedback
Foxfir3 joined the room.
mrassili
daz what do you mean by "virtual text"
@jaawerth:matrix.org
but daz makes a good point, I should play with that setting
daz
https://i.imgur.com/it5G8HR.png this bad boy
Foxfir3
how does kakoune bring anything new to the table?
daz
it has clippy
buu
daz: how do you enable that?
mrassili
never heard of kakoune
daz
buu: diagnostics.virtualText in cocconfig
@jaawerth:matrix.org
mrassili: there are settings like diagnostic.virtualText and diagnostic.virtualTextPrefix as well as highlight groupes you can override to change how it's displayed. should be documented in the coc help
daz
diagnostic.virtualText even
buu
Hmmmmmmmmmmmm
mrassili
I see
Tae Won Ha (Gitter)
Hi guys. If I execute :highlight in Neovim, it seems that Neovim does not accept any MsgPackRPC calls. What I did:
Launch nvim via NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim and enter :highlight
Execute the following python script
from pynvim import attach
nvim = attach('socket', path='/tmp/nvim.sock')
print(nvim.api.get_mode())
I expected to get {'mode': 'r', 'blocking': True}, but the script waits and does not get a response from nvim. Is this intentional and if so, how can I detect this state?
Foxfir3
okay. well.. without the dog, Its not really great I suppose
Tae Won Ha (Gitter)
(edited) ... get {'mode': ... => ... get something like
{'mode': ...
buu
daz: You seem like you might know this
daz
know what :v
@jaawerth:matrix.org
mrassili: yeah if you :helpgrep virtualText or just :h coc-nvim and a search for virtualt, similarly you can see the highlight groups if you :h CocErrorVirtualText (which is the first one)
buu
daz: When I do CocCommand document.renameCurrentWord it works fine but the word I selected is highlighted in orange.. and stays highlighted after I finish running it
How do I get the hilight to go away
daz
maybe :nohl
Justin M. Keyes (Gitter)
@qvacua you would need to connect before checking nvim_get_mode
daz
maybe not, dunno :v
buu
daz: I think it's a different hl =[
I have all the search hilighting stuff off
Tae Won Ha (Gitter)
@justinmk I don't understand what you mean by connect?
Justin M. Keyes (Gitter)
@qvacua IOW nvim_get_mode will not block, but you need to be connected already.
NVIM_LISTEN_ADDRESS=/tmp/nvim.sock nvim
connect from API client
execute :hi
call nvim_get_mode from API client
the attach() step in your python sample code
Tae Won Ha (Gitter)
ah I see
Björn Linse (Gitter)
We could improve this, I think this was neovim/neovim#10506
[WIP] server: make rpc connection a "fast" event. by bfredl · Pull Request #10506 · neovim/neovim - GitHub
might avoid deadlock when connecting to $NVIM_LISTEN_ADDRESS from luv within the same process. Creating a RPC connection does nothing by itself so this should be safe. (ChanOpen autocmd is already ...
Justin M. Keyes (Gitter)
yeah.
@qvacua just FYI, to avoid this problem during startup, nvim --embed waits for UI to connect before doing any Vimscript init.
Tae Won Ha (Gitter)
So, with that PR, my simple script would work?
Justin M. Keyes (Gitter)
(explained a :help --embed)
(edited) (explained a :help ... => (explained at
:help ...
@jaawerth:matrix.org
buu: that's probably using the highlight groups coc uses under the hood (which I think is in the docs), I'm guessing you can clear it with :highlight clear or :highlight clear group-name to not set ALL highlighting back to defaults
you'd just have to figure out what group it's using for the latter
surprised there isn't something built into the plugign to provide more control for that though, I hate when highlights are still around after I'm done with 'em
maybe there is and I just don't know about it
buu
I'll try that next time I use it
Reading Time: 5 minutes Git’s push --force is destructive because it unconditionally overwrites the remote repository with whatever you have locally, possibly overwriting any changes that…
Additional Information on Undoing things in git: https://git-scm.com/book/en/v2/Git-Basics-Undoing-Things
drawing boxes on the commandline.
Surrounding things, making tuis pop, all sorts of rectangles, decorations, and surroundings
Arch Linux Install Script (alis) installs unattended, automated and customized Arch Linux system. - picodotdev
Instead of using sed ''command "file" | awk 'operation' you can just do it all with awk alone and avoid pipelines (|) ... awk 'command' "infile" >> "outfile"
You can pattern match with awk just like you are with sed... awk '!/^#/ {print}' .. this // acts as a pattern match of the current line just like sed, the ! just negates it, you can also chain them together with && and || .. awk '!/^#/ && !/^$/ {print}' prints all lines except commented and blank ones.
- https://disconnected.systems/blog/archlinux-meta-packages/#what-are-meta-packages
- https://wiki.archlinux.org/index.php/creating_packages
- https://www.reddit.com/r/archlinux/comments/clw7v0/replicate_your_system_with_selfhosted_arch_linux/
- https://www.reddit.com/r/archlinux/comments/chuala/install_and_postinstall_scripts_from_zero_to/
Can be installed with https://getmic.ro | bash and already runs at full speed ahead.
Seems like a viable alternative for systems where getting vim eco-system set up is not feasible.
Performs a search and uses the resulting DOI to create a new bibtex entry. Uses the crossref API. - atisharma
URxvt resources
- Archwiki
- Basic Configuration&Extensions
- Sane defaults
- Dynamic font-resizsing plugin
- True color support test
- using git submodule for perl extensions with stow
- clipboard management
- using it as dropdown term
- additional x configuration information for dropdown terminals
- image display in term
- why is urxvt good discussion
- 'essential' extensions
Unix shell startup order and initialization of config files
A tutorial for adding tab completion to your scripts using the Bash Programmable Completion functionality.
Commit history (preferably of a non-pushed path, since it rewrites hashes) can be edited; useful for feature branches with useless commits / debug messages / strange orders and so on -- things which happen during committing, but should not stay in the end-product.
- best article: https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
- why squash?: https://jamescooke.info/git-to-squash-or-not-to-squash.html
- rebasing basics: https://git-scm.com/book/en/v2/Git-Branching-Rebasing
- some workflow recommendations: http://justinhileman.info/article/changing-history/
- additional tips (mostly covered in first link tho): https://www.maykinmedia.nl/blog/2017/nov/20/git-rebasing-make-your-commit-history-pretty/
Data science workflow with vim slimux and python
demonstration here -- 40min
run-down of vim completion options and omnifunc and plugins to get lsp (language server protocol) support
A Vim Window Animation Library. Contribute to camspiers
Really good introductory video for kubernetes concepts;
breaks down with simple analogies and really quick history: pods, services, ingress, deployments, resource allocation vs dynamic resource management; rolling update; and probably 1-2 things more
The 2019 edition is out! Utilising Snapraid, MergerFS, Docker, Ubuntu, ZFS and Proxmox the Perfect Media Server is back and ready to serve (your media).
For those that love art making and writing, art journals are a great way to express their inner selves. Check out art journal prompts and supplies here!
Store your Notes in any Git Repo. simple mobile app to take notes, and sync with any git repo (github/-lab/gitea/ssh/...)
A simple Python script to to search the web with rofi - pdonadeo
A powerful todo list application for the console, using the todo.txt format.
Supports:
- due dates
- recurring tasks
- dependent tasks
all in todotxt format. Written in python, with cli and tui interfaces
documentation here or on the wayback machine
also carries idea of text-based item identifiers which are more stable than default todotxt line-based ids (since when item is done or new ones added, its line can suddenly change)
Roam has a learning curve, but after a few weeks of playing with it I already love it much more than Evernote and Notion. Here's why, and how I'm using it.
A tiny docker image with a working tectonic latex engine and biber with a primed cache.
Visit my page on docker hub at: https://hub.docker.com/r/dxjoke/tectonic-docker/ \
Visit my page on github at: https://github.com/WtfJoke/tectonic-docker \
Only ~75MB compressed.
A fully working latex engine. Packages that are not in the cache will be downloaded on demand.
I use this container to build my thesis automated. It includes bibtex8 and Glossaries
A guide to navigating of the competitive marketplace of web hosting companies and cloud service providers.
Gitless: a simple version control system built on top of Git
Automatically commits on saving and might be better suited for prose workflows?
I'm developing using Python and Django for a website. I want to take a BibTex entry and output it in a view in 3 different formats, MLA, APA, and Chicago. Is there a library out there that already ...
A couple years ago, I moved from Google Voice to custom infrastructure . That system used XMPP to send SMS. Now that I've moved from XMPP ...
Proper project management with Taskwarrior in vim. - tbabej
Finds the strongest password(s) from a url using passwordmeter - red-bin
Problem:
-
hetzner is cheap, but only supplies 20GB SSD space; its storage is block-storage and relatively pricey (~5€ for 50gb)
-
nextcloud works with object storage -- we can get much cheaper storage solutions through this
-
Wasabi is a cheap object storage solution (1TB for 5€)
-
Contabo is a cheap VPS hosting solution (faster than hetzner, 4core cpu, 8gb ram and 200gb ssd for 4,99€; or 300gb hdd for 3,99 w/2cores,4g ram)
-
Migrate over to contabo + wasabi
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
Power management with tlp and powertop , some applicable to dell xps
-> also check archwiki powertop and xps pages
and: https://www.reddit.com/r/Dell/comments/6s2e3w/optimizing_dell_xps_for_linux/
Search worldwide news articles and headlines from all over the web in real-time with our free News API.
Jellyfin -- plex/emby alternative, completely FOSS and forked form emby when they went closed source
- Rosetta Code -- Code Problem repository; from simple to hard with solutions for many languages
- Project Euler -- Code Problem repository; generally a bit harder, more algorithm-focused than Rosetta
- Exercism -- mentor-based code exercises. You send in problem solutions via cli, and a mentor can check them and give tips to you. FOSS
- CodeWars -- 'compete' against others in exercises; you send in solutions and people can vote on how successful (or elegant) your solution is
Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada: - so-fancy
Check if pipes (stdin) are empty.
Also see for additional information on string checking: https://stackoverflow.com/questions/12137431/test-if-a-command-outputs-an-empty-string
version controlled data storage (using mongodb, mysql or other underlying data storage) -- like git for data (with commits, checkouts, branches, pulls, pushes etc)
Bibtex field type explanations
- fd to replace find
- bat to replace cat
- keybase providing keybase_bin func w/o interface bloat
- efibootmgr to replace grub
- upstart or another to replace systemd
- ncdu -- ncurses disk usage analyzer
Python3 CLI to interact with a Shaarli instance. Contribute to shaarli
- General GPG best practices
- this is in some cases outdated -- see corresponding issue with specific issue links
- GPG Key management
- Managing GPG keys with cmdline
- might also be outdated in specific areas
- Offline Key management with link to corresponding guide
- GPG Subkey management
I am a vimwiki user, but now I want to use the vim-pandoc tools to create PDF from markdown files of the wiki. The problem is that the function of omnicomplete, for bib cites, of vim-pandoc does not work when I have installed vimwiki.
solution: add init function to onenter command
OR, if using deoplete to complete:
call deoplete#custom#var('omni', 'input_patterns', {
\'pandoc': '@\w*',
\})
call deoplete#custom#var('omni', 'functions', {
\'pandoc': 'pandoc#completion#Complete',
\})
To enable omnifunc completion for pandoc, invoked on @someletters. If your bib-file is large, it will take a second.
(you can also get the completions from multiple functions, using a dict in the functions: pandoc definition, e.g. ['pandoc#completion#Complete', 'wiki#links#aggregate']
)
Tab completions can be a big usability win for CL tools, but building it into your program isn’t straightforward, and there aren’t many how-to resources online. Luckily, I found this excellent tutorial written by James Coglan, and used it to build tab completion for my program notes.
Roadmap to becoming a web developer in 2020. Contribute to kamranahmedse
-
Really good list, open source
-
Backend (JSON files describing the roadmaps) Could be used to create a small website
- have each json generate clickable page
- on each page present a couple of good resources for that thing
- perhaps let user track progress along roadmap blocks
Uses fzf to provide a selection list for starting tmuxinator projects - camspiers
WLED library gets native Home Assistant API integration. This post walks you through everything you need to get up and running.
can create floating windows like this: https://old.reddit.com/r/neovim/comments/eu6kbe/floating_fzf_with_borders_and_file_previews/
fzf floating window in nvim
Short notes on many texts; of interest:
- journaling
- minimalism
- stoicism
- speaking/social skills
- self-improvement
- writing
Making vim-loop more like jobstart to enable easy asynchronous lua programming in nvim
Extensive description of concepts and uses of org-mode.
I don't use org-mode personally (the syntax falls just into the uncanny valley of markdown-like) but this covers concepts as well as uses, so might be useful outside a strict org-context as well.
CodiMD - Realtime collaborative markdown notes on all platforms. - codimd
Freelance Artist - beautiful wallpapers
incredibly simple linux distro with plain text packaging software -- when I have time; investigate
Eier kochen und die richtige Kochzeit finden? Lesen Sie hier, wie lange Sie Eier kochen müssen. Es kommt dabei auf die Größe der Eier und ihre Ausgangstemperatur an. Mit Kochzeitrechner.
perfect eggs cooking time
[50:00]
Understanding underlying structure of git:
- content addressable filesystem
- blobs and trees
- tags and branches as refs
- what does branching do
- what does merging do
- what does resetting do
- how to use the reflog to revert local actions
Learning Python should be fun and easy. We provide an interactive Python textbook that helps you learn to program in Python right in your browser.
Think like a programmer, seems like an immensely useful book.
Markup for keeping track of revisions and changes, good for editing and reviewing
and vim plugin
Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero dependencies. https:
Todo vim integration discussion; different systems from paper to file-system oriented to org-mode to plain markdown discussed
Safe and simple one-script git synchronization.
Idea is continuous history (a la gopass git) -- it's not a pretty history, but it automatically syncs on filechanges.
There are many different resources:
Basics:
- Archwiki Basics: Creating Packages
- Archwiki Developerwiki: Building in a clean chroot -- useful for building on normal machine, not as useful for cicd/docker development
- Archlinux base docker image official (160mb)
- Pacman basics: Using a custom (local) repository
PKGBUILD and Archrepo explanation:
- 3 parter: Hosting arch repos on s3, managing archlinux with metapackages, creating a custom installer
- additional advanced ways of building replicating metapkgs
- older article: building packages on linux
- older article: creating an archlinux repository
PKGBUILD examples:
CI/CD:
- extensive automated builds -- fetching from different repositories and automatically hosting on gitlab pages (very useful resource); awesome documentation
- more minimal setup -- using 1 repository for packages; mainly bash building, does not deploy a gitlab pages repo (can be adapted from above link); nicely documented
- in-between -- look at ci-library.sh/ci-build.sh; more well-established practices than repo above; but almost-nonexistent documentation
A methodology for building modern, scalable, maintainable software-as-a-service apps.
- Dokku -- really small quick and painless setup, single instance hosting, get up running in minutes and deploy containerized apps with simple git push. Awesome for tiny to small projects.
- Flynn -- slightly bigger and more involved, can scale to multiple servers by creating its own cluster, interaction is similar to dokku (i think) -- DEAD
- Rack -- most similar to heroku, I am not sure if complete self-hosting is possible; but follows simple deployment model and allows full use of 12factor apps
- Porter -- built for Kubernetes, seems more involved not sure about corporate backing or community involvement
- vim-clap -- general purpose finder, opener, quickfix list display, preview window, akin to ctrlP, denite, etc; uses nvim's floating window, handles many files, can do rg and fzf, looks very nice. Lots of screenshots and demonstration gifs
- vim-buffet -- takes your buffers and tabs, and shows them combined in the tabline
- vimade -- fade buffers that are not active slightly from view
- vim-test -- from your code runs nearly any corresponding test file, can do so asynchronously, many test run strategies
- indentLine -- show thin indentation markers for each line
- startify -- show a start-screen on running vim
- semantic-highlight / nvim-colorcoder -- highlights variables in different colors, instead of code keywords see article
- vista.vim -- display a sidebar with function/variable name tree (from ctags or lsp)
- vim-tabular -- vim-cast explanation semi-automatically align many characters (e.g. all = declarations, a table with | pipes, etc) -- or vim-easy-align which might be more featureful
- switch.vim -- switch between two (or more) different version of a word/line/code fragment (screencast included). Seems really useful for potential elif <-> else substitutions and similar
- speeddating -- I am fairly sure i have something like this enabled; figure out how to disable? the shortcuts work for numbers for me
- boxes -- boxes, for generating comments and surrounding stuff (by using dispatch or a text-filter)
-> many more plugins, sorted by category: https://github.com/mhinz/vim-galore/blob/master/PLUGINS.md - gundo.vim -- a graphical representation of the vim undo tree to jump around to any change made (map it to something like leader-u as a stronger undo)
- vim-orgmode -- emacs orgmode, but in vim
- vim-table-mode -- create and align tables; seems a tad complicated
A powerful testing framework for ZSH projects. Contribute to zunit-zsh
zsh general guide, going increasingly in-depth
tmux 2.4 made a significant change to key bindings. Here is how to support custom keybindings for versions before and after tmux 2.4
Serif possibility for writing in terminal?
A collection of short howtos on how to move most of your config files to $XDG_CONFIG_HOME.
Making linux applications XDG-aware
Simplified how-to for some common zsh completion script procedures
- For in-depth, but confusing manual: http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-System-Configuration
Contains specs for utility functions, tags, and special designated variables - Gentle, opinionated introduction: https://zv.github.io/a-review-of-zsh-completion-utilities
- readable, more in-deth guide: http://zsh.sourceforge.net/Guide/zshguide.html