Skip to content

Instantly share code, notes, and snippets.

@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active November 14, 2024 22:10
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@liarokapisv
liarokapisv / Main.hs
Created March 14, 2021 10:39
Ast Transformation - De bruijn Annotation along with Validation using Data.Comp.Multi
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ViewPatterns #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE QuantifiedConstraints #-}
@ricardocosme
ricardocosme / avr-gcc-10.2-freestanding.sh
Created February 8, 2021 21:19
avr-gcc 10.2 with libstdc++ using the freestanding implementation
#This is a step-by-step guide to build the avr-gcc 10.2 with the
#libstdc++ using the freestanding implementation[1].
#
#Don't expect a robust script without boilerplates or something coded
#to be resilient. This is only a short register of what I need to
#obtain the compiler in this mode.
#
#[1] https://timsong-cpp.github.io/cppwp/n4861/compliance
wget https://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.gz
@Krever
Krever / _README.md
Last active August 3, 2024 07:11
Yabai setup for i3wm users
@JayKickliter
JayKickliter / compdb.mk
Created February 28, 2018 21:26
Generate 'compile_commands.json' in Makefile
%.compdb_entry: %.c
@echo " {" > $@
@echo " \"command\": \"cc $(CFLAGS) $(CPPFLAGS) -c $<\"," >> $@
@echo " \"directory\": \"$(CURDIR)\"," >> $@
@echo " \"file\": \"$<\"" >> $@
@echo " }," >> $@
COMPDB_ENTRIES = $(addsuffix .compdb_entry, $(basename $(SOURCES)))
compile_commands.json: $(COMPDB_ENTRIES)
@danwagnerco
danwagnerco / vim_vundle_and_conemu.md
Created June 22, 2015 20:43
This is a Windows-specific walkthrough for installing Vim, Vundle and ConEmu

Vim, Vundle and ConEmu on Windows

Let's start by getting it out on the table: Sublime Text is great, and version 3 should no longer be considered "abandonware" as of build 3065. Sublime Text served me very, very well over the years. That said, trying out new things is a major part of leveling-up, and in that vein Vim deserves a go. (And have you seen some of those thoughtbot guys flying around in Vim? It's awesome!)

Getting Vim up-and-running on your Windows machine doesn't have to be an all-day project. In this post, we'll walk through:

  • Installing gVim, which gives us both the "classic" command line version as well as the graphical version
  • Installing Vundle, the best way to handle Vim-enhancing packages
  • Installing ConEmu, a supercharged command line emulator for Windows
@montanaflynn
montanaflynn / fortune.fish
Created October 3, 2014 15:45
Fun with fish and fortunes
# place this in your fish path
# ~/.config/fish/config.fish
function fish_greeting
if not type fortune > /dev/null 2>&1
apt-get install fortune
end
fortune -a
end
@robatron
robatron / javascript-log-wrapping.md
Last active October 27, 2024 14:01
Wrapping `console.log` (et al.) in your own function to modify logging behavior.

JavaScript Log Wrapping

Wrapping console.log (et al.) in your own function to modify logging behavior.

Why?

You may want a simple way to: