Skip to content

Instantly share code, notes, and snippets.

@RomaniukVadim
RomaniukVadim / bspwm.txt
Created Apr 6, 2018
Bspwm install arch linux
View bspwm.txt
Binary Space Partitioning Window Manager = bspwm
Youtube Video: https://youtu.be/ZbXQUOwcH08
bspwm install
pacman packages:
bspwm
sxhkd
@noelbundick
noelbundick / LICENSE
Last active Sep 29, 2020
Solarized Dark for Bash on Windows
View LICENSE
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@mistic100
mistic100 / Mediakeys.ahk
Last active Sep 24, 2021
Media keys shortcuts for AutoHotkey
View Mediakeys.ahk
; AutoHotkey Media Keys
^!Space::Send {Media_Play_Pause}
^!Left::Send {Media_Prev}
^!Right::Send {Media_Next}
^!NumpadMult::Send {Volume_Mute}
^!NumpadAdd::Send {Volume_Up}
^!NumpadSub::Send {Volume_Down}
View printing on console
print("Total score for %s is %s " % (name, score))
Or use the new-style string formatting:
print("Total score for {} is {}".format(name, score))
Or pass the values as parameters and print will do it:
print("Total score for", name, "is", score)
If you don't want spaces to be inserted automatically by print, change the sep parameter:
print("Total score for ", name, " is ", score, sep='')
@todgru
todgru / starttmux.sh
Last active Sep 13, 2021
Start up tmux with custom windows, panes and applications running
View starttmux.sh
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
View foldtext.vim
function! MyFoldText() " {{{
let line = getline(v:foldstart)
let nucolwidth = &fdc + &number * &numberwidth
let windowwidth = winwidth(0) - nucolwidth - 3
let foldedlinecount = v:foldend - v:foldstart
" expand tabs into spaces
let onetab = strpart(' ', 0, &tabstop)
let line = substitute(line, '\t', onetab, 'g')