Skip to content

Instantly share code, notes, and snippets.

@stankotrcek
stankotrcek / .bash_colours
Created January 29, 2023 16:35 — forked from johanbove/.bash_colours
TaskWarrior aliases and other stuff
# Inspired by Paul Fenwick (https://gist.github.com/pjf)
# See https://gist.github.com/pjf/051aa4ef326d493beec950823f7edfd8#file-bashrc
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
Yellow='\[\e[0;33m\]' # Yellow
@stankotrcek
stankotrcek / ledger-cli-post-snippet
Last active January 26, 2022 18:51
Create New ledger-cli post.
// VSCODE Create post structure for ledger-cli.
// https://code.visualstudio.com/docs/editor/userdefinedsnippets
"Ledger post": {
"scope": "ledger",
"prefix": "post",
"body": [
"$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE ${1:PAYEE} ; ${2:NOTE}",
"\t${3:ACCOUNT}\t\t ${4:AMOUNT} EUR\t; ${5:NOTE}",
"\t${6:ACCOUNT}\t\t-${4:AMOUNT} EUR\t; ${8:NOTE}",
@stankotrcek
stankotrcek / gist:ffa0c594aa86c9530cd5f55a6548eac1
Created January 1, 2022 16:39
Python - COG code generation tool
Cog is a file generation tool.
It lets you use pieces of Python code as generators in your source files to generate whatever text you need.
This page describes version 3.3.0, released November 19, 2021.
[pypi](https://pypi.org/project/cogapp/)
[web](https://nedbatchelder.com/code/cog)
[gh](https://github.com/nedbat/cog)
@stankotrcek
stankotrcek / enums_ex01
Created December 31, 2021 09:56
python Enums help keep your code consistent
""" source: https://mobile.twitter.com/itsBexli/status/1476538225724375041 """
from dataclasses import dataclass
from enum import Enum, auto
class Maker(Enum):
TOYOTA = auto()
TESLA = auto()
SUBARU = auto()
@stankotrcek
stankotrcek / power-rename.md
Last active April 23, 2020 03:45
Prepend to file name.
Seven different types of CSS attribute selectors
// This attribute exists on the element
[value]
// This attribute has a specific value of cool
[value='cool']
// This attribute value contains the word cool somewhere in it
[value*='cool']
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="content">
</div>
@stankotrcek
stankotrcek / README.rst
Created January 28, 2017 21:24 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

#file{
visibility: hidden;
width: 0;
height: 0;
}
#select {
width: 150px;
height: 70px;
background: #2ecc71;