Skip to content

Instantly share code, notes, and snippets.

View sekirocc's full-sized avatar
🎯
Focusing

Seki Rocc sekirocc

🎯
Focusing
  • ByteDance
  • Beijing
View GitHub Profile
@sekirocc
sekirocc / Emacs.kms
Created September 28, 2023 04:04 — forked from machinekoder/Emacs.kms
Emacs keys for Qt Creator
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE KeyboardMappingScheme>
<!-- Written by Qt Creator 4.2.1, 2017-03-27T21:24:06. -->
<mapping>
<shortcut id="CppTools.OpenHeaderSourceInNextSplit">
<key value="Ctrl+E, F4"/>
</shortcut>
<shortcut id="CppTools.SwitchHeaderSource">
<key value="F4"/>
</shortcut>
@sekirocc
sekirocc / left_ctrl & left_shift => spacebar
Last active December 31, 2021 06:45
cat ~/.config/karabiner/assets/complex_modifications/My.json
{
"title": "Change left ctrl/ left shift to spacebar",
"rules": [
{
"description": "Change left_ctrl to spacebar if pressed alone, to left_ctrl if pressed with other keys",
"manipulators": [
{
"from": {
"key_code": "left_control",
"modifiers": {
@sekirocc
sekirocc / .xvimrc
Created December 13, 2021 06:06
xvimrc
""""""""""""""""""""""""""""""
" XVim config
""""""""""""""""""""""""""""""
set blinkcursor
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
@sekirocc
sekirocc / spacebar => right_control
Created July 30, 2021 12:04
~/.config/karabiner/assets/complex_modifications/My.json
{
"title": "My e changes",
"rules":
[
{
"description": "spacebar -> right_control (spacebar if pressed alone)",
"manipulators":
[
{
"from":
@sekirocc
sekirocc / config.yaml
Created July 27, 2021 09:05
~/.config/zellij/config.yaml
---
keybinds:
unbind: [Ctrl: 'g']
normal:
- action: [SwitchToMode: Locked,]
key: [Alt: 's',]
locked:
- action: [SwitchToMode: Normal,]
key: [Alt: 's',]
resize:
1) Hide title bar
xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x2, 0x0, 0x0"
2) Show title bar
xprop -f _MOTIF_WM_HINTS 32c -set _MOTIF_WM_HINTS "0x2, 0x0, 0x1, 0x0, 0x0"
@sekirocc
sekirocc / docker-cleanup-resources.md
Created January 19, 2018 09:49 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@sekirocc
sekirocc / bootstrap-linux.sh
Created December 1, 2017 07:18
bootstrap a linux dev env. with tmux, vim, golang.
#! /bin/bash
#
# bootstrap a linux dev env. install vim, tmux, golang dev, k8s.
# ./bootstrap-linux.sh
#
set -x -e
# Configure vim and tmux
# use UTF8
# set -g utf8
# set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 10000
@sekirocc
sekirocc / heap_array.go
Last active August 31, 2017 08:12
heap, represented as array.
package main
import "fmt"
/*
In this program, our heap is represented as rune slice.
T
/ \