Skip to content

Instantly share code, notes, and snippets.

View macielportugal's full-sized avatar

Maciel Portugal macielportugal

View GitHub Profile
@Lamarcke
Lamarcke / lualine.lua
Last active March 16, 2024 22:50
Lualine config for LSP clients, formatters and linters
-- Returns a string with a list of attached LSP clients, including
-- formatters and linters from null-ls, nvim-lint and formatter.nvim
local function get_attached_clients()
local buf_clients = vim.lsp.get_active_clients({ bufnr = 0 })
if #buf_clients == 0 then
return "LSP Inactive"
end
local buf_ft = vim.bo.filetype
@nepsilon
nepsilon / auto-backup-your-configuration-files-with-vim.md
Last active April 27, 2024 00:36
Auto-backup your configuration files with Vim — First published in fullweb.io issue #71

Auto-backup your configuration files with Vim

Not using versioning on your configuration files and editing them with Vim?

Use Vim’s backup option to automatically keep a copy of past versions. To put in your ~/.vimrc:

"Turn on backup option
set backup
@wholypantalones
wholypantalones / dangolcsvdownloadmanitellyouwhat.js
Last active August 7, 2019 09:29
Force download of csv response from ajax request
$.ajax({
url: "path/to/csvData",
type: "GET",
dataType: "text",
success: function (data) {
csvData = 'data:application/csv;charset=utf-8,' + encodeURIComponent(data);
$("#exportsags").attr({
"href": csvData,
"download": "sag_data.csv"
@sloria
sloria / bobp-python.md
Last active May 31, 2024 07:02
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@ricardobarantini
ricardobarantini / estados.php
Last active December 12, 2023 19:04
Array com nome e siglas de estados Brasileiros para select do Codeigniter
$estadosBrasileiros = array(
'AC'=>'Acre',
'AL'=>'Alagoas',
'AP'=>'Amapá',
'AM'=>'Amazonas',
'BA'=>'Bahia',
'CE'=>'Ceará',
'DF'=>'Distrito Federal',
'ES'=>'Espírito Santo',
'GO'=>'Goiás',
@codeincontext
codeincontext / itunes-podcast-categories.yml
Created February 7, 2011 12:50
A list of the current iTunes podcast categories - in YAML format
- Arts:
- Design
- Fashion & Beauty
- Food
- Literature
- Performing Arts
- Spoken Word
- Visual Arts
- Business:
- Business News