Skip to content

Instantly share code, notes, and snippets.

View albenik's full-sized avatar

Veniamin Albaev albenik

  • Moscow, Russia
View GitHub Profile
@albenik
albenik / pre-commit
Last active July 2, 2019 06:48
git pre-commit hook for go.mod consistency check
#!/bin/sh
# Runs `go mod tidy` first.
# Then checks for modified but not staged `go.mod` & `go.sum` fileds.
exec 1>&2
go mod tidy
gm=`git status --porcelain -- go.mod`
@albenik
albenik / component.vue
Created June 19, 2019 18:26
vue + axios + reddit little hint
<template>
<ul v-for="r in reddits">
<li><h4>{{r.title}}</h4><p>{{r.text}}</p></li>
</ul>
</template>
<script>
import { retrieveReddits } from './data'; // No nedd to specify js extension here. It will be added implicitely
export default {
@albenik
albenik / .tigrc
Last active September 20, 2023 06:15
tig arrow keys navigation
# $HOME/.tigrc
bind diff <Up> move-up
bind diff <Down> move-down
bind stage <Up> move-up
bind stage <Down> move-down
set main-view = date:local=yes author:full commit-title:graph=yes,refs=yes,overflow=72
@albenik
albenik / ssh_config
Last active December 11, 2019 15:05
MacOS ssh + keychain
# MacOS: `ssh-add -K`
Host *
AddKeysToAgent yes
UseKeychain yes

https://bolknote.ru/all/4085/#comments

  • ~/Library/Preferences/com.apple.HIToolbox.plist
  • plutil -convert xml1 com.apple.HIToolbox.plist
  • Вычищаем все внутри которых есть упоминание раскладки, которая вам не нужна и сохраняем
  • plutil -convert binary1 com.apple.HIToolbox.plist
  • Перезагружаемся

Dock

Read currest dock size

defaults read com.apple.dock tilesize

Write specific dock size

edition = "2021"
imports_layout = "Vertical"
imports_granularity = "Crate"
group_imports = "StdExternalCrate"
root = true
[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true