Skip to content

Instantly share code, notes, and snippets.

View mdyzma's full-sized avatar
🏠
Working from home

Michal Dyzma mdyzma

🏠
Working from home
View GitHub Profile
import os
import glob
from typing import List
preamble = """
Copyright 2020 (c) Netguru S.A.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
#!/bin/bash
cat .gitignore | while read line
do
if [[ $line == *#* ]]
then
echo #skip
else
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch '"$line" --prune-empty --tag-name-filter cat -- --all
fi
@mdyzma
mdyzma / after-install-linux.sh
Last active January 23, 2016 07:39
After install for debian based linux distro.
#!/usr/bin/env bash
echo "Installing Java repository..."
sudo add-apt-repository -y ppa:webupd8team/java;
sudo apt-get update;
# Custom bash prompt via kirsle.net/wizards/ps1.html
#export PS1="\[$(tput bold)\]\[$(tput setaf 6)\]\t \[$(tput setaf 2)\][\[$(tput setaf 3)\]\u\[$(tput setaf 1)\]@\[$(tput setaf 3)\]\h \[$(tput setaf 6)\]\W\[$(tput setaf 2)\]]\[$(tput setaf 4)\]\\$ \[$(tput sgr0)\]"
#!/bin/bash
#check if variable was passed from terminal with file execution
if [ -z "$1" ]; then
echo -e "\e[31mPodaj nazwe projektu\e[0m"
else
# execute oneliner
mkdir -p $1/{jupyter/{plots,data/{mat,csv,cdf,other}},img,docs,utilities}&&touch $1/.gitignore&&echo ".ipynb_checkpoints/">$1/.gitignore&&echo "Projekt stworzony"&&$1/git init && $1/git add -A && $1/git commit -m "Initial commit"&&tree -a $1
fi
@mdyzma
mdyzma / Biosnips
Last active October 22, 2015 21:37
# Biosnips to store some good oneliners and linux tricks
# to perform much more efficiently
# Michal Dyzma 2015
# Creating automaticly folders with actual date
# set alias in .bashrc
alias "today"="date +%F"
# type in console
mkdir foo-$(today)