Starting weechat
06:18:26 | ___ __ ______________ _____
#!/usr/bin/env python | |
import os | |
import math | |
from numpy import interp | |
from random import choice, sample | |
from time import sleep | |
from math import log1p | |
# from colour import Color |
fzf_argfiles() { | |
fzf --multi | tr '\n' ' ' | |
} | |
# for unstaged changes and untracked files | |
fzf_dirty_files() { | |
git status --porcelain | cut -c 1,2,3 --complement | fzf --multi --preview-window=up:50% --preview='git diff --color=always {}' | |
} | |
fzf_modified_files() { |
" 24 simple pseudo-text objects | |
" ----------------------------- | |
" i_ i. i: i, i; i| i/ i\ i* i+ i- i# | |
" a_ a. a: a, a; a| a/ a\ a* a+ a- a# | |
" can take a count: 2i: 3a/ | |
for char in [ '_', '.', ':', ',', ';', '<bar>', '/', '<bslash>', '*', '+', '-', '#' ] | |
execute "xnoremap i" . char . " :<C-u>execute 'normal! ' . v:count1 . 'T" . char . "v' . (v:count1 + (v:count1 - 1)) . 't" . char . "'<CR>" | |
execute "onoremap i" . char . " :normal vi" . char . "<CR>" | |
execute "xnoremap a" . char . " :<C-u>execute 'normal! ' . v:count1 . 'F" . char . "v' . (v:count1 + (v:count1 - 1)) . 'f" . char . "'<CR>" | |
execute "onoremap a" . char . " :normal va" . char . "<CR>" |
What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.
In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.
Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th
" HOW TO DO 90% OF WHAT PLUGINS DO (WITH JUST VIM) | |
" Max Cantor | |
" NYC Vim Meetup -- August 3, 2016 |
-- put this file somewhere in your nvim config, like: ~/.config/nvim/lua/config/lua-lsp.lua | |
-- usage: require'lspconfig'.sumneko_lua.setup(require("config.lua-lsp")) | |
local library = {} | |
local path = vim.split(package.path, ";") | |
-- this is the ONLY correct way to setup your path | |
table.insert(path, "lua/?.lua") | |
table.insert(path, "lua/?/init.lua") |
# Usage: copy-to-docker-volume SRC_PATH DEST_VOLUME_NAME [DEST_PATH] | |
copy-to-docker-volume() { | |
SRC_PATH=$1 | |
DEST_VOLUME_NAME=$2 | |
DEST_PATH="${3:-}" | |
# create smallest Docker image possible | |
echo -e 'FROM scratch\nLABEL empty=""' | docker build -t empty - | |
# create temporary container to be able to mount volume | |
CONTAINER_ID=$(docker container create -v my-volume:/data empty cmd) | |
# copy files to volume |