Skip to content

Instantly share code, notes, and snippets.

# With oh-my-zsh
clear
printf "customization under ~/.oh-my-zsh/custom/example.zsh\n"
alias ll="ls --color=auto -alFh "
alias ip="ip -c"
alias open="xdg-open "
alias pylama="pylama -o ~/.pylama.ini "
alias gti="git"
alias jm="jmaas"
@schilli91
schilli91 / .vimrc
Created December 3, 2024 13:12
.vimrc
" e ++ff=unix
set fileformats=unix
set number
" set nonu
highlight LineNr ctermfg=darkgrey
import inspect
if __name__ == '__main__':
def treeClass(cls, ind=0):
print('-' * ind, cls.__name__)
for i in cls.__subclasses__():
treeClass(i, ind + 3)
print("Hierarchy for Built-in exceptions is:")
{
"files.autoSave": "onFocusChange",
"files.eol": "\n",
"window.openFoldersInNewWindow": "on",
"workbench.tree.indent": 25,
"workbench.tree.renderIndentGuides": "always",
"editor.fontFamily": "'Fira Code', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
"editor.fontLigatures": true,
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
package main
// https://tutorialedge.net/golang/parsing-json-with-golang/
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"strconv"

Hardware information

lshw
lspci

Input devices

Get information about input devices

bash

substitution

FOO="This old man went fishing."
echo "${FOO//old/fishing}"
>>> This fishing man went fishing.

Golang

Modules & Packages

Packages

In go a package is a directory that may contain multiple .go files. All go files have to include the line package <package-name> on top, with <package-name> being the name of the directory.

Jenkins Pipeline

Running scripts

The sh step runs the default shell. If it doesn't use bash maybe the default shell needs to be changed. Alternatively, a shebang may be added to the first line:

sh '''#!/bin/bash
 echo "Hello from bash"