- i and a for insert mode
- I and A for insert to begin/end
- o and O for insert new line below/above
- {n}G or :{n} for moving to specified line
- 0 for moving to beginning of current line
// Zed settings | |
// | |
// For information on how to configure Zed, see the Zed | |
// documentation: https://zed.dev/docs/configuring-zed | |
// | |
// To see all of Zed's default settings without changing your | |
// custom settings, run `zed: open default settings` from the | |
// command palette (cmd-shift-p / ctrl-shift-p) | |
{ | |
"assistant": { |
require 'id3tag' | |
require 'pathname' | |
require 'fileutils' | |
MUSIC_FOLDER = Pathname.new('./music') | |
# Get all MP3 files. | |
songs = Dir.entries(MUSIC_FOLDER).select { |song| song.end_with? '.mp3' } | |
# Read each file ID3 tag. |
import shutil | |
from escpos.printer import Usb | |
import requests | |
from PIL import Image | |
def download_cat_image(status_code=200): | |
"""Download cat image based on status_code.""" |
ffmpeg -y -i /dev/video0 -vframes 1 -q:v 2 ~/output.jpg | |
gwenview -f ~/output.jpg & | |
sleep 2 | |
loginctl lock-session |
#!/usr/bin/env bash | |
### Script to store ssh_key on remote machine. | |
### No prompt for password :) | |
# Replaced with ssh-copy-id :shrug: | |
if [[ "$#" -ne 1 ]]; then | |
echo "Interactive help:" | |
echo "-----------------" | |
echo " --- Script to store public ssh key to remote machine ---" |
{ | |
"editor.fontSize": 20, | |
"editor.minimap.enabled": true, | |
"editor.fontLigatures": true, | |
"editor.fontFamily": "'Dank Mono','Fira Code','Anonymous Pro', Consolas, 'Courier New', monospace", | |
"editor.cursorBlinking": "blink", | |
"editor.smoothScrolling": true, | |
"editor.lineHeight": 34, | |
"editor.renderWhitespace": "none", | |
"editor.renderControlCharacters": false, |
def create_emtpy_cyclic_array(rows = 3, columns = 3): | |
matrix = [] | |
for i in range(rows): | |
row_array = [] | |
for j in range(columns): | |
row_array.append(" x ") | |
matrix.append(row_array) |