Skip to content

Instantly share code, notes, and snippets.

Maciej Pasternacki mpasternacki

Block or report user

Report or block mpasternacki

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .xkbmap
xkb_keymap {
xkb_keycodes { include "xfree86+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols {
include "pc+pl+ctrl(swap_lwin_lctl)+ctrl(swap_rwin_rctl)"
replace key <UP> {
type[Group1]= "THREE_LEVEL",
symbols[Group1]= [ Up, Up, NoSymbol ],
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<PGUP>, clearMods=Mod5) ]
View keybase.md

Keybase proof

I hereby claim:

  • I am mpasternacki on github.
  • I am mpasternacki (https://keybase.io/mpasternacki) on keybase.
  • I have a public key whose fingerprint is 5810 5238 081B 0C33 46BF A0F5 A43B 1DDA E9A0 8CCF

To claim this, I am signing this object:

View freebsd_on_mbp.md

FreeBSD on a MacBook Pro

Since 2008 or 2009 I work on Apple hardware and OS: back then I grew tired of Linux desktop (which is going to be MASSIVE NEXT YEAR, at least since 2001), and switched to something that Just Works. Six years later, it less and less Just Works, started turning into spyware and nagware, and doesn't need much less maintenance than Linux desktop — at least for my work, which is system administration and software development, probably it is better for the mythical End User person. Work needed to get software I need running is not less obscure than work I'd need to do on Linux or othe Unix-like system. I am finding myself turning away from GUI programs that I used to appreciate, and most of the time I use OSX to just run a terminal, Firefox, and Emacs. GUI that used to be nice and unintrusive, got annoying. Either I came full circle in the last 15 years of my computer usage, or the OSX experience degraded in last 5 years. Again, this is from a sysadmin/developer ki

View git-pass.sh
#!/bin/sh
set -e
# git-pass
# ========
# This script allows easy usage of http://www.passwordstore.org/ with
# multiple, Git-managed stores. It works both as self-standing shell
# script (that can be committed to the repository itself), or as a Git
# subcommand (in which case it should reside somewhere in $PATH or in
@mpasternacki
mpasternacki / docker-compile.pl
Last active Jan 17, 2016
Perl script to build a Docker image from Dockerfile that creates the image in a single layer, without any intermediate images. Needs JSON CPAN module (available as `libjson-perl` Debian/Ubuntu package). Usage: run the script in the directory that contains a Dockerfile. More details in a blog post: http://3ofcoins.net/2013/09/22/flat-docker-images/
View docker-compile.pl
#!/usr/bin/env perl
use feature 'switch';
use strict;
use warnings;
use Data::Dumper;
use File::Basename;
use File::Copy;
use File::Path qw/make_path/;
View json2path.py
#!/usr/bin/env python
import json
import sys
def pp(vv, prefix='$'):
if isinstance(vv, (list,tuple)):
for i, v in enumerate(vv):
pp(v, "{0}[{1}]".format(prefix, i))
elif isinstance(vv, dict):
@mpasternacki
mpasternacki / bundle-activate.sh
Created May 28, 2013
Script to activate Ruby Gem Bundler environment in current shell session.
View bundle-activate.sh
#!/bin/sh
#
# This script activates a Gem Bundler environment in current shell
# session. This lets you type commands without `bundle exec` all the
# time, even if you leave the project's directory, and without complex
# magic that runs with every command.
#
# Usage: save this file somewhere. Use following command to activate
# current directory's bundle in current shell session:
#
@mpasternacki
mpasternacki / runner.pl
Last active Dec 16, 2015
A runner script to run any command and save its stdout and stderr in a timestamped log file, ready to be harvested by Logstash. Adds JSON metadata, and optionally locks the command, ensuring it doesn't run in multiple copies at the same time.
View runner.pl
#!/usr/bin/env perl -w
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2013 Maciej Pasternacki <maciej@pasternacki.net>
#
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this license document, and changing it is allowed as long
# as the name is changed.
@mpasternacki
mpasternacki / soup_download.rb
Last active Dec 15, 2015
Download lolcats from your soup.io while it's up! Needs Ruby (used with MRI - "the regular ruby" - 1.9.3, should work with 1.9.2 or 2.0.0; 1.8.7 is a "maybe") and the Nokogiri gem (http://nokogiri.org).
View soup_download.rb
require 'fileutils'
require 'open-uri'
require 'yaml'
require 'rubygems'
require 'nokogiri'
FileUtils.mkdir_p 'items'
feed = Nokogiri::XML(File.open('3fc1319c496ea1aacde451cecbdc17e3.rss'))
@mpasternacki
mpasternacki / README.md
Last active Jan 18, 2018
A Continuous Packaging Pipeline: The Materials
View README.md

A Continuous Packaging Pipeline

A list of tools mentioned in my Ignite talk from Devopsdays Rome 2012 on a continuous packaging pipeline, with links and short description for each tool.

The talk slides are at https://speakerdeck.com/mpasternacki/a-continuous-packaging-pipeline; a longer blog post will be written soon.

Vendorificator

Available at https://github.com/3ofcoins/vendorificator/ or with gem install vendorificator

Include third party modules in your git repo, using pristine branches to sanely maintain local changes, upgrades, and merges.

You can’t perform that action at this time.