Skip to content

Instantly share code, notes, and snippets.

View Miroshni4enko's full-sized avatar

Viacheslav Miroshnychenko Miroshni4enko

View GitHub Profile
@Miroshni4enko
Miroshni4enko / vimrc
Created May 25, 2020 18:07
Add preview for Ag and Files commands from fzf vim plugin
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
command! -bang -nargs=? -complete=dir Ag
\ call fzf#vim#ag(<q-args>, fzf#vim#with_preview(), <bang>0)
@Miroshni4enko
Miroshni4enko / requests.js
Created March 16, 2019 16:21 — forked from drucoder/requests.js
Spring Boot REST: тестироем rest методы
// GET all
fetch('/message/').then(response => response.json().then(console.log))
// GET one
fetch('/message/2').then(response => response.json().then(console.log))
// POST add new one
fetch(
'/message',
{
@Miroshni4enko
Miroshni4enko / postgres_queries_and_commands.sql
Created September 24, 2018 12:54 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'

Example: You have a branch refactor that is quite different from master. You can't merge all of the commits, or even every hunk in any single commit or master will break, but you have made a lot of improvements there that you would like to bring over to master.

Note: This will not preserve the original change authors. Only use if necessary, or if you don't mind losing that information, or if you are only merging your own work.

On master:

> git co -b temp