Skip to content

Instantly share code, notes, and snippets.

View ratheesh's full-sized avatar

Ratheesh(ರತೀಶ್) ratheesh

  • ಬೆಂದಕಾಳೂರು, ಕರ್ನಾಟಕ, ಭಾರತ
  • 18:39 (UTC +05:30)
View GitHub Profile
local M = {
"neoclide/coc.nvim",
branch = "master",
build = "yarn install --frozen-lockfile",
}
M.config = function()
-- Some servers have issues with backup files, see #649
vim.opt.backup = false
vim.opt.writebackup = false
@glegrain
glegrain / mpu.c
Created November 6, 2020 07:59
STM32H7 MPU Configuration
/**
* @brief Configure the MPU attributes as Write Through for External SDRAM.
* @note The Base Address is 0xD0000000 .
* The Configured Region Size is 32MB because same as SDRAM size.
* @param None
* @retval None
*/
void MPU_Config(void)
{
MPU_Region_InitTypeDef MPU_InitStruct;
@debashisdeb
debashisdeb / debug_stuff.py
Last active March 13, 2023 15:58 — forked from dhrrgn/debug_stuff.py
A handy SQL debug function for Flask-SQLAlchemy
from . import app
from flask.sqlalchemy import get_debug_queries
if app.debug:
app.after_request(sql_debug)
def sql_debug(response):
queries = list(get_debug_queries())
query_str = ''
@WetHat
WetHat / CL-PrettyPrintTrees.ipynb
Last active March 25, 2025 15:58
Pretty Print Tree Data Structures in Common Lisp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@scambier
scambier / pyGitDiff.py
Created March 19, 2019 12:41
Copy all changed files between two git commits. Respects the folders structure.
#! /usr/bin/python
# Usage: python pyGitDiff.py hash1 hash2
# Help: python pyGitDiff.py -h
import subprocess
import os
import shutil
from datetime import datetime
import argparse
ignoreList = [".gitignore"]
@agriffis
agriffis / .vimrc
Created February 25, 2019 12:53
neovim clipboard provider for tmux and OSC 52
function! ClipboardCopy(lines, regtype)
let sum = TryClipboardCmd('md5sum', a:lines)
call writefile(sum, s:regtype_sum, 'S')
call writefile([a:regtype], s:regtype_txt, 'S')
return TryClipboardCmd('clipboard-provider copy', a:lines)
endfunction
function! ClipboardPaste()
let lines = TryClipboardCmd('clipboard-provider paste')
let regtype = 'V'
@acepukas
acepukas / init.vim
Last active April 16, 2021 19:54 — forked from danmikita/init.vim
File preview with FZF, RG, Bat, and Devicons (supports multiple file open and opening files in splits and tabs)
" ripgrep
if executable('rg')
let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob "!.git/*"'
set grepprg=rg\ --vimgrep
command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob "!.git/*" --color "always" '.shellescape(<q-args>).'| tr -d "\017"', 1, <bang>0)
" Overriding fzf.vim's default :Files command.
" Pass zero or one args to Files command (which are then passed to Fzf_dev). Support file path completion too.
command! -nargs=? -complete=file Files call Fzf_dev(<q-args>)
@gustavorv86
gustavorv86 / c_priority_queue_threads.c
Last active September 8, 2023 04:42
POSIX message priority queue example written in C/C++
/**
* Compile:
* gcc -std=gnu11 -Wall -Wextra c_priority_queue_threads.c -o priority_queue_threads -lpthread -lrt
*/
#include <errno.h>
#include <mqueue.h>
#include <fcntl.h> /* For O_* constants. */
#include <sys/stat.h> /* For mode constants. */
@mikiyaf
mikiyaf / mru.zsh
Created November 13, 2017 01:31
mru(mru+fzf) : mru incremental search by fzf, and execute vim, less, ...
mru() {
local -a f
f=(
~/.vim_mru_files(N)
~/.unite/file_mru(N)
~/.cache/ctrlp/mru/cache.txt(N)
~/.frill(N)
)
if [[ $#f -eq 0 ]]; then
echo "There is no available MRU Vim plugins" >&2
@larsch
larsch / install-arch-linux-rpi-zero-w.sh
Created July 6, 2017 06:05
Install Arch Linux ARM for Raspberry Pi Zero W on SD Card (with commands to configure WiFi before first boot).
#!/bin/sh -exu
dev=$1
cd $(mktemp -d)
function umountboot {
umount boot || true
umount root || true
}
# RPi1/Zero (armv6h):