Skip to content

Instantly share code, notes, and snippets.

@mPastuszko
mPastuszko / Moja konfiguracja Maca.txt
Created December 18, 2015 10:12
Moja konfiguracja Maca
Konsola: iTerm2, choć wbudowana aplikacja Terminal jest też bardzo funkcjonalna
Edytor kodu i nie tylko: Sublime Text 2 – ostatnio bardzo popularny na wszystkich platformach
Poczta: Postbox, choć wbudowany Apple Mail jest też bardzo funkcjonalny
Komunikator Jabber/GTalk/GG itp.: Adium, choć w ostatnim czasie mało używam, bo głównie Skype
Muzyka: Clementine (do lokalnych mediów, bo iTunes mi nie podchodzi) + Cantata do sterowania MPD w domu
PDFy itp.: Skim, choć wbudowana aplikacja Preview też ma spore możliwości (niektóre nawet lepsze niż Skim)
Video (też z napisami): VLC
Backupy: Carbon Copy Cloner
VPN: Tunnelblick
Zaawansowane gesty touchpadem: Jitouch, jako uzupełnienie gestów wbudowanych w system (sporo ich jest)
@mPastuszko
mPastuszko / samsung-remote.xml
Last active September 15, 2021 20:32
Samsung remote key mapping for Kodi
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
<!-- The <global> section is a fall through - they will only be used if the button is not -->
<!-- used in the current window's section. Note that there is only handling -->
<!-- for a single action per button at this stage. -->
<!-- For joystick/gamepad configuration under linux/win32, see below as it differs from xbox -->
<!-- gamepads. -->
<!-- The format is: -->
<!-- <device> -->
@mPastuszko
mPastuszko / fragment.rb
Created August 15, 2014 19:42
Ruby looks like LISP sometimes
.map { |subject_answers|
subject_answers.merge(
summary: (subject_answers[:summary_r] || subject_answers[:summary_w])
.keys
.inject({}) { |memo, material|
memo.merge(
material => subject_answers[:summary_r][material]
.keys
.inject({}) { |memo, probe|
memo.merge(
class Array
def second
self[1]
end
def key
self[0]
end
def value
Story: Filter project by date range
!-------------------------------------------------------------------------------
As an XTRF user
I want to filter out projects by date ranges
In order to find the projects I look for
!--=============================================================================
Scenario: User selects projects starting *today* using *quick select in filter sidebar*
@mPastuszko
mPastuszko / XTRFImporter.rb
Created October 24, 2012 10:44
XTRF API adapter in Ruby
require 'rubygems'
require 'savon'
require 'XTRFNamespaces'
class XTRFImporter
def initialize(config)
@config = config
end
def ws
@mPastuszko
mPastuszko / ws2sten.rb
Created April 14, 2012 14:34
Przeliczanie WS na steny
u = [] # górne granice przedziałów (bez ostatniego)
k = "E3" # komórka
s = ""
u.each_index{|i| s +="JEŻELI(#{k} <= #{u[i]}; #{i+1}; "}
s += "10" + ")" * u.size
s