$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
This file contains 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
;; TODO: Proper all-the-icons usage | |
;; TODO: Modular stats | |
;; TODO: Emacs package? | |
;; TODO: Portable | |
(require 'all-the-icons) | |
(require 'subr-x) | |
(let ((bat | |
(concat | |
(string-trim |
This file contains 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
(defun a/_exwm-statusbar-battery () | |
"Get laptop battery current capacity." | |
(let ((bat | |
(concat | |
(string-trim | |
(shell-command-to-string | |
"cat /sys/class/power_supply/BAT0/capacity")) | |
"%"))) | |
bat)) |
This file contains 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
{ | |
"name": "emacs", | |
"url": "https://git.savannah.gnu.org/git/emacs", | |
"tag": "emacs-27.1-rc1", | |
"commands": [ | |
["make", "distclean"], | |
["sh", "autogen.sh"], | |
["sh", "configure --prefix={ _local } --with-modules --with-xwidgets --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xft --with-xpm --with-x --with-dbus --with-imagemagick --with-mailutils --with-gnutls --with-x-toolkit=gtk3"], | |
["make", "-j2"], | |
["make", "install"] |
This file contains 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
using System; | |
namespace test | |
{ | |
class Program | |
{ | |
static void Main() | |
{ | |
var fruit ="apple"; | |
var flavor = "orange"; |
This file contains 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
Debugger entered--Lisp error: (wrong-type-argument stringp nil) | |
expand-file-name(nil) | |
userlock--check-content-unchanged("/dados/Pessoal/lsp-mode/docs/page/lsp-bash.md") | |
userlock--ask-user-about-supersession-threat("/dados/Pessoal/lsp-mode/docs/page/lsp-bash.md") | |
write-region(1 116 "/dados/Pessoal/lsp-mode/docs/page/lsp-bash.md" t) | |
append-to-file(1 116 "/dados/Pessoal/lsp-mode/docs/page/lsp-bash.md") | |
(progn (insert-file-contents "../template/lsp-client-var.md") (while (re-search-forward "{{\\([][:word:]\\[.-]+\\)}}" nil t) (let* ((key (match-string 1)) (value (lsp-doc--variable->value it key client))) (replace-match value t t))) (append-to-file (point-min) (point-max) file)) | |
(unwind-protect (progn (insert-file-contents "../template/lsp-client-var.md") (while (re-search-forward "{{\\([][:word:]\\[.-]+\\)}}" nil t) (let* ((key (match-string 1)) (value (lsp-doc--variable->value it key client))) (replace-match value t t))) (append-to-file (point-min) (point-max) file)) (and (buffer-name temp-buffer) |
This file contains 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
#!/usr/bin/env python3 | |
"""Qtile configuration.""" | |
from pathlib import Path | |
from shutil import which | |
from dataclasses import dataclass | |
try: | |
from typing import List # noqa: F401 |
This file contains 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
set $mod Mod4 | |
# Font for window titles. Will also be used by the bar unless a different font | |
# is used in the bar {} block below. | |
font pango:monospace 8 | |
# This font is widely installed, provides lots of unicode glyphs, right-to-left | |
# text rendering and scalability on retina/hidpi displays (thanks to pango). | |
#font pango:DejaVu Sans Mono 8 |
This file contains 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
#!/bin/sh | |
echo | |
if [ ! -d "deps" ] || [ ! "$(ls -A deps)" ]; then | |
printf "\e[32m=> Fetching dependencies and building the application...\e[0m\n\n" | |
echo "+ mix do deps.get, compile --verbose" | |
mix do deps.get, compile --verbose | |
echo | |
fi |
Bash is the JavaScript of systems programming. Although in some cases it's better to use a systems language like C or Go, Bash is an ideal systems language for smaller POSIX-oriented or command line tasks. Here's three quick reasons why:
- It's everywhere. Like JavaScript for the web, Bash is already there ready for systems programming.
- It's neutral. Unlike Ruby, Python, JavaScript, or PHP, Bash offends equally across all communities. ;)
- It's made to be glue. Write complex parts in C or Go (or whatever!), and glue them together with Bash.
This document is how I write Bash and how I'd like collaborators to write Bash with me in my open source projects. It's based on a lot of experience and time collecting best practices. Most of them come from these two articles, but here integrated, slightly modified, and focusing on the most bang for buck items. Plus some ne
OlderNewer