Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimitri Sokolyuk dim13

View GitHub Profile
@dim13
dim13 / commit.txt
Last active Apr 25, 2020
Git Commit Messages
View commit.txt
Capitalized, short (50 chars or less) summary
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of an email and the rest of the text as the body. The blank
line separating the summary from the body is critical (unless you omit
the body entirely); tools like rebase can get confused if you run the
two together.
Write your commit message in the imperative: "Fix bug" and not "Fixed bug"
View macvim-padding
defaults write org.vim.MacVim MMTextInsetLeft 5
defaults write org.vim.MacVim MMTextInsetRight 5
View lesspipe
#!/bin/sh
#
# $RuOBSD: lesspipe,v 1.3 2004/04/08 04:57:24 form Exp $
#
# Copyright (c) 2003 Oleg Safiullin <form@pdp-11.org.ru>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
@dim13
dim13 / try.c
Created Aug 9, 2019
try/catch in plain c
View try.c
#include <err.h>
#include <stdio.h>
#include <setjmp.h>
#include <signal.h>
static sigjmp_buf exception;
#define try if (!sigsetjmp(exception, 1))
#define catch else
#define throw siglongjmp(exception, 1)
View git-license
#!/bin/sh
YEAR=`date +%Y`
NAME=`git config user.name`
MAIL=`git config user.email`
cat <<EOF>LICENSE
Copyright (c) $YEAR $NAME <$MAIL>
Permission to use, copy, modify, and distribute this software for any
View xkb
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT=","
XKBOPTIONS="compose:102,caps:escape,grp:alt_space_toggle"
BACKSPACE="guess"
@dim13
dim13 / Makefile
Created Nov 20, 2018
Mirror all go releases (OpenBSD Make)
View Makefile
SRC:= 1.2.2
SRC+= 1.3 1.3.1 1.3.2 1.3.3
SRC+= 1.4 1.4.1 1.4.2 1.4.3
SRC+= 1.5 1.5.1 1.5.2 1.5.3 1.5.4
SRC+= 1.6 1.6.1 1.6.2 1.6.3 1.6.4
SRC+= 1.7 1.7.1 1.7.3 1.7.4 1.7.5 1.7.6
SRC+= 1.8 1.8.1 1.8.2 1.8.3 1.8.4 1.8.5 1.8.6 1.8.7
SRC+= 1.9 1.9.1 1.9.2 1.9.3 1.9.4 1.9.5 1.9.6 1.9.7
SRC+= 1.10 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5
SRC+= 1.11 1.11.1 1.11.2
View OpenBSD update
#!/bin/sh
#
VERSION=OPENBSD_$(uname -r | tr . _)
MODULES='src ports xenocara'
CVSROOT=anoncvs@anoncvs.eu.openbsd.org:/cvs
export ${CVSROOT}
cd /usr
cvs -d ${CVSROOT} up -r${VERSION} -ACPd ${MODULES}
View Go Makefile
DEPS=$(shell go list -f '{{join .Deps " "}}' .)
SRCS=$(shell go list -f '{{range .GoFiles}}{{$$.Dir}}/{{.}} {{end}}' ${DEPS} .)
app: ${SRCS}
go build -o $@ .
View XTerm TangoDark
! Color scheme: TangoDark
*foreground: #ffffff
*background: #000000
*cursorColor: #ffffff
! Black
*color0: #000000
*color8: #545753
! Red
*color1: #cc0000
*color9: #ef2828
You can’t perform that action at this time.