Skip to content

Instantly share code, notes, and snippets.

View Rio-Nyx's full-sized avatar
🎯
Focusing

Rio Nyx Rio-Nyx

🎯
Focusing
View GitHub Profile
inoremap <silent><expr> <TAB>
\ pumvisible() ? coc#_select_confirm() :
\ coc#expandableOrJumpable() ?
\ "\<C-r>=coc#rpc#request('doKeymap', ['snippets-expand-jump',''])\<CR>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ coc#refresh()
function! s:check_back_space() abort
let col = col('.') - 1
@Rio-Nyx
Rio-Nyx / custom-bindings.conf
Created July 14, 2022 18:16
keybindings that I use with gnome-40 (fedora)
# This is a comment
# dconf dump / | sed -n '/\[org.gnome.settings-daemon.plugins.media-keys/,/^$/p' > custom-shortcuts.conf # Export
# dconf load / < custom-shortcuts.conf # Import
[org/gnome/settings-daemon/plugins/media-keys]
control-center=['<Super>s']
custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5/']
www=['<Super>b']
[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0]
@Rio-Nyx
Rio-Nyx / git guide
Last active September 12, 2021 05:08
commonly used git commands
git init // creates a local repo
git remote add origin https://..... // adding remote location
git switch master // switch to branch master
git merge main master // merge main with master, should be in main branch
git push origin master // push commits of master branch to remote loc
git add . // add every file in current folder to repo
git commit -am "commit" // commit message
git pull origin master --allow-unrelated-histories // merge conflicts
/*
Output the pairs of elements with the smallest difference. If there are multiple pairs,
output all of them in ascending order, all on the same line with just a single space between each pair of numbers.
A number may be part of two pairs when paired with its predecessor and its successor.
*/
/*
Output the pairs of elements with the smallest difference. If there are multiple pairs,
output all of them in ascending order, all on the same line with just a single space between each pair of numbers.
A number may be part of two pairs when paired with its predecessor and its successor.
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>