Skip to content

Instantly share code, notes, and snippets.

View stasiek's full-sized avatar
💭
I may be slow to respond.

Stasiek Wołowski stasiek

💭
I may be slow to respond.
View GitHub Profile
@stasiek
stasiek / 6-aisd-1
Created April 14, 2014 00:47
6-abd
## Aplikacje Bazodanowe - 1 lista
Dany jest schemat bazy danych projektów zawierający następujące relacje:
*Projekt(Id, Nazwa, Budżet, Typ)* – dane projektów
*Zadanie(Id, Nazwa, Typ, Koszt, StopienWykonania, Pracochłonnosc)* – dane zadania
*Pracownik(Id, NIP,Nazwisko, Pesel, DataUr)* – dane pracownika
*PracownikZadanie(Id, IdZadania, IdPracownika, DataOd, DataDo)* – przypisanie pracownika do zadania
*ZadanieProjekt(Id, IdZadania, IdProjektu, DataOd, DataDo)* – przypisanie zadania do projektu
1. Wyraź w języku SQL następujące zapytania:
@stasiek
stasiek / .shell_prompt.sh
Created February 17, 2014 20:35
Bash/ZSH Config
function __promptline_last_exit_code {
[[ $last_exit_code -gt 0 ]] || return 1;
printf "%s" "$last_exit_code"
}
function __promptline_ps1 {
local slice_prefix slice_empty_prefix slice_joiner slice_suffix is_prompt_empty=1
# section "a" header
@stasiek
stasiek / 5.py
Created February 10, 2014 21:46
#
# Copyright (c) 2011 Christopher Felton
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@stasiek
stasiek / 5-misp-kola
Created February 8, 2014 17:56
MPiS-koła
### Pierwsze kolokwium
1. Rzucamy 3 razy niezależnie symetryczną monetą. Niech $X$ oznacza liczbę orłów.
a) Naszkicować dystrybuantę $X^2$
b) Policzyć $EX^2$
c) Policzyć $Pr[2X>1]$
2. Rzucamy kostką aż l-ty raz wypadnie "szóstka". Niech X będzie liczbą wykonanych rzutów.
Policzyć:
a) $Pr[X=l+2]$
b) $EX$
#!/bin/bash
# OSX RAMdisk with rsync auto backup
# Variables config
ramdisk="name"
path1="source/path/1"
path2="source/path/2"
path3="source/path/3"
rsyncinterval="300" # autobackup interval
ramdisksize="4096" # RAMdisk size in MB
@stasiek
stasiek / .tmux.conf
Last active December 25, 2015 14:58
tmux config made from examples
# Terminal settings
set -g default-terminal "xterm-256color"
enable utf-8 on status bar
set -g status on
set -g status-utf8 on
set -g status-bg green
set -g status-right "%H:%M" # %d-%b-%y
set -g bell-action none
set -g lock-after-time 1800
@stasiek
stasiek / mpd.conf
Last active December 19, 2015 05:39
20130702mpd.conf5.1 through PulseAudio
# This is needed for mpd crashing on db update. https://forums.gentoo.org/viewtopic-t-891806-start-0.html
decoder {
plugin "ffmpeg"
enabled "no"
}
# Files and directories #######################################################
#
# This setting controls the top directory which MPD will search to discover the
# available audio files and add them to the daemon's online database. This
@stasiek
stasiek / .vimrc
Last active December 15, 2015 14:58
osx
" NERDTree, Pathogen
" Tagbar http://majutsushi.github.com/tagbar/
" Gundo http://sjl.bitbucket.org/gundo.vim
" https://github.com/vim-scripts/Gundo
" When started as "evim", evim.vim will already have done these settings.
if v:progname =~? "evim"
finish
endif
" Use Vim settings, rather than Vi settings (much better!).