Drafts

Draft and unpublished posts

0 posts

Steep

Steam achievements and progress for Steep - 0.0% complete with 0/41 achievements unlocked.

5 min

extending vim with shell commands

Vimconf 2022

Extending vim does not need to be complicated and can be done using cli tools that you might already be comfortable with. Examples, setting up codeformatters with autocmds, using lf/ranger as a tui file manager, generating new files using a template framework like cookiecutter/copier/yeoman, using ag to populate your quickfix.

vimconf!!<esc>!!figlet

formatters #

local settings = require'waylonwalker.settings' M.waylonwalker_augroup = augroup('waylonwalker', { clear = true }) M.format_python = function() if settings.auto_format.python then vim.cmd('silent execute "%!tidy-imports --black --quiet --replace-star-imports --replace --add-missing --remove-unused " . bufname("%")') vim.cmd('silent execute "%!isort " . bufname("%")') vim.cmd('silent execute "%!black " ....

...

1 min read
from kedro.pipeline import node node( input=&#34;raw&#34;, output=&#34;int&#34;, func=my_func, tags=[&#34;one&#34;], )
11ty https://www.rockyourcode.com/how-to-deploy-eleventy-to-github-pages-with-github-actions/ hugo puts it in the base url https://gohugo.io/getting-started/configuration/#baseurl mkdocs uses a special cli build command https://squidfunk.github.io/mkdocs-material/publishing-your-site/#github-pages

Upon first running an aws cli command using localstack you might end up with the following error.

Unable to locate credentials. You can configure credentials by running "aws configure".

Easy way #

The easy easiest way is to leverage a package called awscli-local.

pipx install awscli-local

Leveraging the awscli #

If you want to use the cli pro

aws
npx create-react-app todoreact import React,{useState,useEffect} from 'react'; import './App.css'; function App() { const [data,setData]=useState([]); const [newName,setNewName]=useState([]); const getData=()=>{ fetch('/api' ,{ headers : { 'Content-Type': 'application/json', 'Accept': 'application/json' } } ) .then(function(response){ return response.json(); }) .then(function(myJson) { setData(myJson) }); } useEffect(()=>{ getData() },[]) const addItem= async () => { const rawResponse = await fetch('/api/add/', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }, body: JSON.stringify({&#34;name&#34;: newName}) }); const content = await rawResponse; console.log(content); getData() } return ( <div className=&#34;App&#34;> { data && data.length>0 && data.map((item)=><p>{item.id}{item.priority}{item.name}<button>raise priority</button></p>) } <input type='text' value={newName} onChange={(e) => (setNewName(e.target.value))} /> <button onClick={addItem} >add item</button> </div> ); } export default App;

Hatch allows you to specify direct references for dependencies in your pyproject.toml file. This is useful when you want to depend on a package that is not available on PyPI or when you want to use a specific version from a Git repository. Often used for unreleased packages, or unreleased versions of packages.

docs

{% for year in markata.map(“date.year”, filter=‘published’)|unique %}

{% for post in markata.map(‘post’, filter=“published and date.year == “+year|string, sort=‘date’) %}

Muck

Steam achievements and progress for Muck - 2.04% complete with 1/49 achievements unlocked.

5 min

sein

Steam achievements and progress for sein - 8.77% complete with 5/57 achievements unlocked.

5 min

xrandr is a great cli to manage your windows in a linux distro using x11, which is most of them. The issue is that I can never remember all the flags to the command, and if you are using it with something like a laptop using a dock the names of all the displays tend to change every time you redock. This makes it really hard to make scripts that work right every time.

Check out the deresmos/xrandr-manager for more details on it.

xrander-manager is a python cli application that is simply a nice interface into xrandr. So you must have xrandr already installed, which is generally just there on any x11 window manager, I’ve never had to install it.

As with any python cli that is indended to be used as a global/system level cli application I always install them with pipx. This automates the process of creating a

jq has some syntax that will sneak up on you with complexity. It looks so good, and so understandable, but everytime I go to use it myself, I don’t get it. ijq is an interactive alternative to jq that gives you and nice repl that you can iterate on queries quickly.

paru -Syu ijq

Here are some other articles, I decided to link at the time of writing this article.

JUT | Read Notebooks in the Terminal