#!/bin/bash | |
# Colors | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NO_COLOR='\033[0m' | |
BLUE='\033[0;34m' | |
YELLOW='\033[0;33m' | |
NO_COLOR='\033[0m' |
PryKeybind.register(:FRAMES, "\c_") do |pry_instance| | |
backt = Byebug.current_context.backtrace | |
result = Fzf( | |
delimiter: ":", | |
preview: 'bat --color=always --style=header, numbers -r ( range {3} $LINES) -H {3} ../{2}', | |
expect: 'ctrl-v' | |
) do | |
backt | |
.map(&:first) | |
.map(&:to_s) |
I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon.
Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?
- Two native ports exist.
# frozen_string_literal: true | |
source "https://rubygems.org" | |
gem 'down' | |
gem 'dry-monads' | |
gem 'http' |
CREATE EXTENSION IF NOT EXISTS "unaccent" | |
CREATE OR REPLACE FUNCTION slugify("value" TEXT) | |
RETURNS TEXT AS $$ | |
-- removes accents (diacritic signs) from a given string -- | |
WITH "unaccented" AS ( | |
SELECT unaccent("value") AS "value" | |
), | |
-- lowercases the string | |
"lowercase" AS ( |
#!/usr/bin/env python3 | |
import os | |
import shutil | |
import subprocess | |
import random | |
from argparse import ArgumentParser | |
from argparse import REMAINDER | |
from pathlib import Path |
NOTE: The Tree-sitter API and documentation has changed and improved since this guide was created. I can't guarantee this is up to date.
Tree-sitter is the new way Atom is providing language recognition features, such as syntax highlighting, code folding, autocomplete, and more. In contrast to TextMate grammars, which work by regex matching, Tree-sitter will generate an entire syntax tree. But more on that can be found in it's own docs.
Here, we look at making one from scratch.