Skip to content

Instantly share code, notes, and snippets.

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='')
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')
@RomaniukVadim
RomaniukVadim / bspwm.txt
Created April 6, 2018 22:02
Bspwm install arch linux
Binary Space Partitioning Window Manager = bspwm
Youtube Video: https://youtu.be/ZbXQUOwcH08
bspwm install
pacman packages:
bspwm
sxhkd
@noelbundick
noelbundick / LICENSE
Last active October 5, 2023 04:20
Solarized Dark for Bash on Windows
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 February 10, 2024 10:26
Media keys shortcuts for AutoHotkey
; 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}
@todgru
todgru / starttmux.sh
Last active March 3, 2024 15:40
Start up tmux with custom windows, panes and applications running
#!/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"