Skip to content

Instantly share code, notes, and snippets.

View it-is-michal's full-sized avatar

Michal Chalupczak it-is-michal

View GitHub Profile
@it-is-michal
it-is-michal / sp
Created July 4, 2018 07:49 — forked from wandernauta/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/usr/bin/env bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
set nu rnu
set mouse=a
set laststatus=2
set smartindent
set smarttab
set tabstop=8
set expandtab
set shiftwidth=4
set softtabstop=4
@it-is-michal
it-is-michal / awesome_i3wm.md
Last active January 10, 2023 20:28
My current i3wm config
@it-is-michal
it-is-michal / README.md
Created July 13, 2016 17:59 — forked from joshdover/README.md
Idiomatic React Testing Patterns

Idiomatic React Testing Patterns

Testing React components seems simple at first. Then you need to test something that isn't a pure interaction and things seem to break down. These 4 patterns should help you use a pattern that is repeatable and readable for the type of test you need.

Setup

I recommend doing all setup in the most functional way possible. If you can avoid it, don't set variables in a beforeEach. This will help ensure tests are isolated and make things a bit easier to reason about. I use a pattern

@it-is-michal
it-is-michal / README.md
Last active March 14, 2016 09:49
Pykonik Coding Dojo #11 - Haiku.log App Kata
@it-is-michal
it-is-michal / 0_README.md
Last active March 10, 2016 09:11
Haiku.log Kata

Haiku.log Kata - README

This Kata is divided into two parts. First do the base part without even looking at the backlog. Once the foundation is ready then move forward to the list of features.

Focus on developing one thing at a time.

Note that some features may be missing, some may not match others right away.

@it-is-michal
it-is-michal / 0_README.md
Last active March 23, 2021 16:30
TODO List App Kata

TODO List App Kata - README

This Kata is divided into two parts. First do the base feature part without even looking at the additional features. Once the foundation is ready then move forward to the list of features.

Focus on developing one thing at a time.

Note that some features may be missing, some may not match others right away.

@it-is-michal
it-is-michal / pavol.sh
Created November 16, 2013 13:18
Pulse Audio volume controll script
#!/bin/bash
# CHANGES, RE-VIEWS/WRITES, IMPROVEMENTS:
# mhasko: functions; VOL-steps;
# gashapon: autodectect default sink
# konrad: more reliable way to autodetect default sink
# source: http://blog.waan.name/pulseaudio-setting-volume-from-command-line/
# get default sink name
SINK_NAME=$(pactl stat | grep "alsa_output" | perl -a -n -e 'print $F[2]')