Skip to content

Instantly share code, notes, and snippets.

View Dema's full-sized avatar

Dmitry Olyenyov Dema

View GitHub Profile
setopt append_history
setopt extended_history # save timestamp
#setopt inc_append_history # add history immediately after typing a command
setopt no_hist_beep
setopt hist_ignore_all_dups
setopt hist_expire_dups_first
setopt hist_save_no_dups
setopt hist_find_no_dups
# Use the same history file for all sessions, conflicts with inc_append_history
setopt share_history
alias tmux='TERM=screen-256color tmux'
alias vim='vim -w ~/.vimlog "$@"'
# alias gvim='gvim -w ~/.vimlog "$@"'
#
#временно, тормоза из-за zsh-users/zsh-autosuggestions
#alias mc='mc -u'
alias ls="ls --color=auto"
@Dema
Dema / .zshrc
Created May 31, 2022 09:16
.zshrc
# if [ -n "$DISPLAY" -a "$TERM" = "xterm" ]; then
# export TERM=xterm-256color
# fi
# Most themes use this option.
setopt promptsubst
@Dema
Dema / swagger.json
Created March 18, 2022 13:06
oneOf issue
{
"openapi": "3.0.1",
"info": {
"title": "Challenge-service API",
"version": "1.0"
},
"servers": [
{
"url": "http://localhost:8080",
"description": "Generated server url"
@Dema
Dema / .eslintrc.js
Last active November 1, 2021 18:06
My .eslintrc.js
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable unicorn/prefer-module */
module.exports = {
extends: [
"eslint:recommended",
"plugin:eslint-comments/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:jest/recommended",
"plugin:jsx-a11y/recommended",
@Dema
Dema / PKGBUILD
Created July 13, 2021 06:40
xmonad session arch package
pkgname=xmonad-dema-xsession
pkgver=1.0
pkgrel=0
arch=("any")
package (){
mkdir -p "${pkgdir}/usr/share/xsessions"
cp ../xmonad.desktop "${pkgdir}/usr/share/xsessions"
@Dema
Dema / addLinara.js
Created November 19, 2020 20:45
Adds Linaria to create-react-app project that uses react-app-rewired and customize-cra
// need to add src/.linaria-cache to .gitignore. I had to move .linaria-cache inside src folder because CRA
// does not allow imports outside src folder.
// I've no idea what is this shit behind babelOptions but it works.
const addLinaria1x = () => (config) => {
addBabelPreset("linaria/babel")(config);
const babelLoader = getBabelLoader(config);
const { loader, options } = babelLoader;
const { plugins, presets } = options;
import { ReactNode } from "react";
import { UnreachableCaseError } from "ts-essentials";
export type RemoteDataContents<T> = T extends RemoteData<infer Data, any>
? Data
: never;
export enum RemoteDataStatus {
Initialized = "Initialized",
Pending = "Pending",
{
"/nix/store/hynacjy0ps0qnz7bycsvnyiimv3q0i6h-netgen.drv": {
"outputs": {
"out": {
"path": "/nix/store/8qbgz0psv6zvfrn3kwgmjd8sb3b0jk90-netgen"
}
},
"inputSrcs": [
"/nix/store/9krlzvny65gdc8s7kpb6lkx8cd02c25b-default-builder.sh"
],
nix-instantiate --strict --json --eval -E 'builtins.map (p: p.name) (import <nixpkgs/nixos> {}).config.environment.systemPackages' | nix run nixpkgs.jq -c jq -r '.[]' | sort -u