Skip to content

Instantly share code, notes, and snippets.

View izikeros's full-sized avatar

Krystian Safjan izikeros

View GitHub Profile

Project Title

Describe briefly what makes your project stand out.

Requirements

  • List of required tools for this project.

Installation

@izikeros
izikeros / stars.sh
Created January 12, 2020 07:55 — forked from sebble/stars.sh
List all starred repositories of a GitHub user.
#!/bin/bash
USER=${1:-sebble}
STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-)
PAGES=$((658/100+1))
echo You have $STARS starred repositories.
echo
@izikeros
izikeros / set_log_level_in_jupyter_notebook.py
Created February 25, 2020 07:40
Set log level in jupyter notebook calling other modules.
# (source: https://stackoverflow.com/a/35327111/3247880)
# Put this code at the beginning of the notebook
import logging
logger = logging.getLogger()
assert len(logger.handlers) == 1
handler = logger.handlers[0]
handler.setLevel(logging.DEBUG)
@izikeros
izikeros / notebook_header.md
Last active July 18, 2024 07:07
[Notebook header] Informative header template for Jupyter notebook. Helpful to get quick orientation when working on multiple notebooks in wide range of time. #notebook #jupyter #header

Title of Notebook

Purpose:

  • describe what can be achieved with this notebook
  • what is the role of the notebook in relation to other notebooks in the project

Created by: Author Name

Jira: PROJ-230

@izikeros
izikeros / Useful_Nim_Lang_snippets.md
Last active April 28, 2020 07:49
Collection of useful snippets of nim code

pass a function as argument

pass mutable function argument with var

proc roster*(school: var School): seq[string] =

(Learned from exercism mentor)

expected error during test

@izikeros
izikeros / bankier.sh
Created July 22, 2020 07:50
Get stock data from bankier.pl, supports multiple tickers at once | Notowania giełdowe GPW | CLI
#!/bin/bash
# bankier.sh
# Getting stock data from bankier.pl
#
# usage:
# ./bankier.sh ticker
# sample tickers:
# WIG
# WIG20
# mWIG40
@izikeros
izikeros / stock-bankier.sh
Last active July 22, 2020 09:06
Get stock and currency data from bankier.pl, supports multiple tickers at once | Notowania giełdowe GPW, ceny surowców, ceny walut | CLI
#!/bin/bash
# stock-bankier.sh
# Getting stock, some currency data from bankier.pl
# Supported currency: EUR, USD
#
# usage:
# ./stock-bankier.sh ticker
# sample tickers:
# MERCATOR
# WIG20
@izikeros
izikeros / PKGBUILD
Created January 25, 2021 10:53 — forked from valeth/PKGBUILD
[archlinux] PKGBUILD template
# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.
# Maintainer: Your Name <[email protected]>
pkgname=NAME
pkgver=VERSION
pkgrel=1
epoch=
@izikeros
izikeros / restic_backup.sh
Created March 31, 2021 07:52 — forked from zerodahero/restic_backup.sh
Restic backup with .gitignore style excludes
#!/bin/bash
TEMPFILE='/tmp/restic_ignores.txt'
BACKUPDIR=$HOME
# Note: Not sure which way is better, echo nothing into the file, or remove if exists
# if [ -f $TEMPFILE ]; then
# rm $TEMPFILE
# fi
# touch $TEMPFILE
@izikeros
izikeros / script-template.sh
Last active March 14, 2024 10:08 — forked from m-radzikowski/script-template.sh
[safe bash script template] see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/ #bash #script #template
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]