This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
function tp() { | |
help() { | |
echo "usage: tp [-h | --help] [<alias>] [<directory>]" | |
} | |
TP_CONFIG_PATH="${XDG_CONFIG_HOME:-$HOME/.config}/tp" | |
TP_CONFIG_FILE="${TP_CONFIG_PATH}/config.tsv" | |
if [ ! -d $TP_CONFIG_PATH ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __KTNYT_THREAD_POOL_HPP__ | |
#define __KTNYT_THREAD_POOL_HPP__ | |
#include <thread> | |
#include <functional> | |
#include <mutex> | |
#include <condition_variable> | |
#include <queue> | |
#include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __KTNYT_SORTED_MAP_HPP__ | |
#define __KTNYT_SORTED_MAP_HPP__ | |
#include <utility> | |
#include <vector> | |
namespace ktnyt { | |
namespace detail { | |
template <class C, bool> struct sorted_map_brace_impl; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define-command -params 1 -shell-script-candidates %{ | |
if [ -d .git ]; then | |
alias list='git ls-files --exclude-standard -co' | |
{ list | xargs -n1 dirname | sort | uniq | perl -ple '$_.="/"'; list | sort; } | fzy -e "$1" | |
else | |
find . -type f -or -type d | fzy -e "$1" | |
fi | |
} fzy-edit %{ | |
edit %arg{1} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define-command -hidden -override c-family-insert-include-guards %{ | |
evaluate-commands %sh{ | |
case "${kak_opt_c_include_guard_style}" in | |
ifdef) | |
echo 'execute-keys ggi__<c-r>%__<ret><esc>gg/include/<ret>dggxs(/|\.)<ret>c_<esc><space>x~ggxyppI#ifndef<space><esc>jI#define<space><esc>jI#endif<space><space>//<space><esc>O<ret><ret><esc>' | |
;; | |
pragma) | |
echo 'execute-keys ggi#pragma<space>once<esc>' | |
;; | |
*);; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generic Settings | |
hook global InsertChar k %{ try %{ | |
exec -draft hH <a-k>jk<ret> d | |
exec <esc> | |
}} | |
hook global WinDisplay .* info-buffers | |
hook global WinCreate ^[^*]+$ %{ add-highlighter window/ number-lines -separator ' ' } | |
# Mappings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include QMK_KEYBOARD_H | |
// #include "flip_keymap.h" | |
extern keymap_config_t keymap_config; | |
#define BASE 0 | |
#define META 1 | |
#define RGB 2 | |
// Fillers to make layering more clear |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __KTNYT_ASSOCVEC_HPP__ | |
#define __KTNYT_ASSOCVEC_HPP__ | |
#include <functional> | |
#include <memory> | |
#include <utility> | |
#include <vector> | |
namespace ktnyt { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
bufio | |
fmt | |
os | |
) | |
func main() { | |
scanner := bufio.NewScanner(os.Stdin) |