Skip to content

Instantly share code, notes, and snippets.

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

auto eth0
iface eth0 inet manual
auto eth0.40
iface eth0.40 inet static
address 10.240.0.11
netmask 255.255.252.0
vlan-raw-device eth0
gateway 10.240.0.1
dns-nameserver 8.8.8.8
@seven1m
seven1m / init.vim
Last active March 17, 2023 21:58
my vim/neovim config in < 100 LOC
syntax on " enable syntax highlighting
set background=dark " we like it dark!
try | colorscheme gruvbox | catch | endtry " use this awesome theme if possible
highlight Pmenu ctermbg=black guibg=black | " fix popup color so it's easier to read
filetype plugin on " load plugins based on file type
filetype indent on " load indent settings based on file type
set shiftwidth=2 " number of spaces to use for indenting
set softtabstop=2 " number of spaces to use when inserting a tab
set tabstop=2 " show tabs as 2 spaces
set expandtab " convert tabs into spaces
@ganeshkamathp
ganeshkamathp / google_assistant.py
Created May 1, 2017 15:57
macos google assistant
"""Sample that implements gRPC client for Google Assistant API."""
from google.assistant.embedded.v1alpha1 import embedded_assistant_pb2
from google.rpc import code_pb2
import logging
import os.path
from googlesamples.assistant import (
assistant_helpers,
audio_helpers,
@YumaInaura
YumaInaura / ZSH.md
Last active February 6, 2024 01:46
Zsh — print command examples ( with help document )

Zsh — print command examples ( with help document )

print is zsh law layer command.

For example it probably build zle command behaviour.

If you master it you will get so beautifule zsh style.

Examples

@jvalrog
jvalrog / scratchpad
Created November 6, 2018 19:44
An i3-like scratchpad using xdotool
#!/bin/sh
#
# SCRATCHPAD
#
# An i3-like scratchpad using xdotool.
#
# Example:
# ~$ scratchpad htop-pad urxvt -T htop-pad -e htop
#
# Explanation:
@craigmurray1120
craigmurray1120 / rest-api-code-generator-list.md
Last active November 18, 2022 09:54
List of REST API code generator
@intrntbrn
intrntbrn / fancy_taglist.lua
Last active March 29, 2024 09:20
awesomewm fancy_taglist: a taglist that contains a tasklist for each tag
-- awesomewm fancy_taglist: a taglist that contains a tasklist for each tag.
-- Usage:
-- 1. Save as "fancy_taglist.lua" in ~/.config/awesome
-- 2. Add a fancy_taglist for every screen:
-- awful.screen.connect_for_each_screen(function(s)
-- ...
-- local fancy_taglist = require("fancy_taglist")
-- s.mytaglist = fancy_taglist.new({
-- screen = s,
@probonopd
probonopd / Wayland.md
Last active June 30, 2024 10:16
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@tiran
tiran / python-on-debian.md
Last active May 21, 2024 08:46
Negative Python user experience on Debian/Ubuntu

Negative Python user experience on Debian/Ubuntu

The user experience of Python on a minimal Debian or Ubuntu installation is bad. Core features like virtual environments, pip bootstrapping, and the ssl module are either missing or do not work like designed and documented. Some Python core developers including me are worried and consider Debian/Ubuntu's packaging harmful for Python's reputation and branding. Users don't get what they expect.

Reproducer

The problems can be easily reproduced with official Debian and Ubuntu containers in Docker or Podman. Debian Stable (Debian 10 Buster) comes with Python 3.7.3. Ubuntu Focal (20.04 LTS) has Python 3.8.5.

Run Debian container