Skip to content

Instantly share code, notes, and snippets.

View lambda-mike's full-sized avatar

Michał Grygierzec lambda-mike

View GitHub Profile
@lambda-mike
lambda-mike / nix_python.py
Created July 20, 2020 05:17
Reproducible builds Nix starter script for Python
#! /usr/bin/env nix-shell
#! nix-shell --pure -i python -p "python38.withPackages (ps: [ ps.django ])"
#! nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/82b5f87fcc710a99c47c5ffe441589807a8202af.tar.gz
import django
print(django)

Elvish

pprint $edit:insert:binding - print keyboard shortcuts

Hit arrow up, tab/shift+tab,Esc, Enter

Alt+, - explode last command to pick args

Ctrl+N - navigation mode

@lambda-mike
lambda-mike / screen_cheatsheet.md
Last active May 30, 2021 16:50
My GNU screen cheatsheet

screen

screen –ls – list available sessions

screen -S tux – create named session

screen –r [pid/name] – reattach to latest/pid/name

screen –dR name – create or (detach and reattach) session name

@lambda-mike
lambda-mike / kakoune_cheatsheet.md
Last active July 11, 2023 23:49
My Kakoune cheatsheet

Kakoune

set verbose mode (good for learning) :set -add global autoinfo normal

Movement

Goto

10g - go to line 10

@lambda-mike
lambda-mike / go-vim.md
Last active June 11, 2020 08:36
go-vim cheatsheet

go-vim cheatsheet

:GoAlternate go to tests and back (toggle)

:GoBuild

:GoCoverageToggle show/hide test coverage

:GoDef gd / Ctrl-t

@lambda-mike
lambda-mike / tmux_cheatsheet.md
Last active August 11, 2022 13:37
My Tmux cheatsheet
@lambda-mike
lambda-mike / fish_prompt.fish
Created May 11, 2020 10:23
Fish lambda prompt
function fish_prompt --description 'Write out the prompt'
set -l color_cwd
set -l suffix
switch "$USER"
case root toor
if set -q fish_color_cwd_root
set color_cwd $fish_color_cwd_root
else
set color_cwd $fish_color_cwd
end
@lambda-mike
lambda-mike / user.json
Created May 11, 2020 10:22
VS Code settings
{
"workbench.iconTheme": "vscode-icons",
"editor.wordWrap": "on",
"editor.minimap.enabled": true,
"zenMode.hideTabs": false,
"zenMode.hideStatusBar": false,
"extensions.autoUpdate": true,
"telemetry.enableTelemetry": false,
"vim.hlsearch": true,
"vim.statusBarColorControl": true
@lambda-mike
lambda-mike / panda.arr
Created May 11, 2020 10:19
Happy Panda written in Pyret lang
# Panda
# Go to https://code.pyret.org/ to see the result
# More about Pyret programming language:
# https://www.pyret.org/
include image
background = empty-scene(200, 200)
ear = circle(12, "solid", "black")
@lambda-mike
lambda-mike / init.vim
Created May 11, 2020 10:16
My neoVim configuration
" Basic config
set autoread " Automatically reload modified buffer
set autowriteall " Automatically write files when some commands occur
set backupcopy=yes " Fix Hot Module Reloading for parcel js
set colorcolumn=80 " Colour column 80
set cursorcolumn " Highlight the column currently under cursor
set cursorline " Highlight the line currently under cursor
set expandtab " Use spaces instead of tabs
set foldlevel=20 " Folds with a higher level will be closed
set foldmethod=indent