Skip to content

Instantly share code, notes, and snippets.

Summary

Buffer local auto commands only seem to work when the file is passed on the command line and not when opening a file in an existing session.

Similar behaviour is exhibited with buffer local map settings as well.

Tested in both vim 8.2.2029 and neovim 6 with the same result.

It's most likely that I'm mis-understanding something but here is what I expect.

#!/usr/bin/env bash
#
# Based on https://github.com/corrupt952/ssm-session
#
# Requirements:
# - fzf (brew install fzf)
#
# Usage:
# Designed to be used to with `aws-vault`:
#
-- Launch new iTerm window on current desktop
-- hs.hotkey.bind({"alt", "shift"}, "return", function()
-- if hs.application.find("iTerm") then
-- hs.applescript.applescript([[
-- tell application "iTerm"
-- create window with default profile
-- end tell
-- ]])
-- else
-- hs.application.open("iTerm")
@cornet
cornet / desc.md
Last active February 19, 2020 23:12

Here is ther error when running terraform plan:

Error: Got error when attempting to fetch image version from registry: Got bad response from registry: 401 Unauthorized

  on ../../../modules/filebeat/main.tf line 1, in data "docker_registry_image" "filebeat":
   1: data "docker_registry_image" "filebeat" {

Relevent part of filebeat/main.tf:

@cornet
cornet / README.md
Created September 17, 2019 23:06 — forked from scintill/README.md
redirect syslog to stderr

LD_PRELOAD this as a library to output a binary's output from syslog() on stderr as well as any syslog daemon that's listening (useful for Docker, if you want all log output to be collected by Docker's standard output handling.) Beware though, if the program changes its stderr file descriptor (closes it, points it at /dev/null, pipes it out to a socket), this can have surprising results. For example, when I tried this with cyrus-imapd, I was getting syslog output sent to remote clients because stderr and stdout were remapped that way (not maintaing the original fd that Docker set up.)

Example Docker implementation

COPY syslog2stderr.c /build
RUN gcc -fPIC -shared /build/syslog2stderr.c -o /usr/local/lib/syslog2stderr.so
RUN echo /usr/local/lib/syslog2stderr.so >> /etc/ld.so.preload

Direnv Setup

First download the required versions of terraform and terragrunt to the following directory structure:

~/terraform/0.12/terraform   # v0.12.5
~/terraform/0.12/terragrunt  # v0.19
~/terraform/0.11/terraform   # v0.11.8
~/terraform/0.11/terragrunt  # v0.18

Install direnv

resource "scaleway_server" "docker" {
name = "${var.name}"
image = "${data.scaleway_image.docker.id}"
type = "${var.type}"
security_group = "${scaleway_security_group.docker.id}"
enable_ipv6 = "${var.ipv6}"
public_ip = "${scaleway_ip.ip.ip}"
provisioner "file" {
source = "${path.module}/files/mount_volume.sh"
0-mail.com
0039.cf
0039.ga
0039.gq
0039.ml
027168.com
0317123.cn
0815.ru
0815.ru
0815.ry
System Information
PROCESSOR: 2 x Intel Xeon E5-2687W v4 @ 2.99GHz
Core Count: 48
Extensions: SSE 4.2 + AVX2 + AVX + RDRAND + FSGSBASE
GRAPHICS:
MOTHERBOARD:
Phoronix Test Suite v8.0.1
Available Suites
* pts/audio-encoding - Audio Encoding System
* pts/chess - Chess Test Suite Processor
* pts/compilation - Timed Code Compilation Processor
* pts/compiler - Compiler Processor
pts/compression - Timed File Compression Processor
* pts/computational - Computational Test Suite System
* pts/computational-biology - Computational Biology Test Suite Processor