Picked these from here
Command | Note |
---|---|
Ctrl + a | go to the start of the command line |
Ctrl + e | go to the end of the command line |
Ctrl + k | delete from cursor to the end of the command line |
09:01 <za1b1tsu> Is it possible to have a shared database on a common partition between 2 OSes? Because I'm trying to achieve this and I can't start the postgres service after changing the data_directory to the shared one. | |
09:01 <za1b1tsu> It's version 9.6.10 | |
09:02 <RhodiumToad> 2 OSes that you are dual-booting? i.e. only one is running at a time? | |
09:02 --> held (~heldchen@unaffiliated/held) has joined #postgresql | |
09:02 <RhodiumToad> the answer is that it depends on the OSes | |
09:03 <peerce> if their libc implementations different significantly, it may not work. | |
09:03 <za1b1tsu> yes dual booting, one is Mac on is Linux, but right now I'm testing this on the VM. Sice I don't want to setup everything and then realize it doesnt work and have to start other. | |
09:04 <peerce> what error do you get when you try and start the 'other' OS that didn't create this ? | |
09:04 <za1b1tsu> the problem is the postgresql log in /var/log/... does not say much or I don't know how to interpret | |
09:04 <RhodiumToad> mac vs linux likely wo |
06:42 <za1b1tsu> So I have a var: ['a','b']. How can I get the last element? | |
06:54 <flowerysong> za1b1tsu: {{ var | last }} | |
06:55 <flowerysong> Or {{ var[-1] }} | |
07:19 <za1b1tsu> but what is this syntax called {{ var | last }} etc. It is not yaml, right? | |
07:19 <@jborean93> it's jinja2 | |
07:20 <@jborean93> http://jinja.pocoo.org/docs/2.10/ |
# thank you aperios from #ruby | |
#! /usr/bin/env ruby | |
class Rubash | |
def tail_match(filename, pattern) | |
fd = File.open(filename, 'rb') | |
file_byte_size = fd.size | |
pos = 0 | |
result = '' | |
result.encode!(Encoding::BINARY) |
yaml2json () { | |
ruby -r yaml -r json -e 'puts YAML.load($stdin.read).to_json' | |
} |
Picked these from here
Command | Note |
---|---|
Ctrl + a | go to the start of the command line |
Ctrl + e | go to the end of the command line |
Ctrl + k | delete from cursor to the end of the command line |
link https://github.com/autozimu/LanguageClient-neovim/issues/379 | |
function! ExpandLspSnippet() | |
call UltiSnips#ExpandSnippetOrJump() | |
if !pumvisible() || empty(v:completed_item) | |
return '' | |
endif | |
" only expand Lsp if UltiSnips#ExpandSnippetOrJump not effect. | |
let l:value = v:completed_item['word'] |
- set paste automation |
# ALT | |
same with alt + the first key stroke of your command. | |
Alt is a meta key that sends esc with any secondary key you press. so when I am in insert, | |
I'll use alt + 3, b to jump back 3 words. or alt+j, j, to go down a couple lines. | |
No remap needed. | |
!!! Some terminals require configuration | |
iterm Edit Profiles -> Keys -> ALT send +Esc | |
# CTRL |
dein#recache_runtimepath() |
iex -S mix test --trace test/services/load_discounts/service_test.exs:42 |