Skip to content

Instantly share code, notes, and snippets.

View jirutka's full-sized avatar
🇺🇦
Слава Україні!

Jakub Jirutka jirutka

🇺🇦
Слава Україні!
View GitHub Profile
@jirutka
jirutka / install_osx.md
Last active March 6, 2022 09:07
How to install Cabot on OS X for development

How to install Cabot on OS X

This manual describes a complete procedure how to install and run Cabot on OS X for development. It was tested on OS X 10.9.1 and Cabot version 2014-01-23.

Important notes

We’re using Homebrew to install the required dependencies on OS X. If you don’t have Homebrew yet (how is that possible? ;), see http://brew.sh/ for an installation script. Note: MacPorts can be probably used too, but we didn’t test it.

Although you can use Python and Ruby that comes with OS X, it’s better to use Python installed via Homebrew and use rbenv to manage Rubies. Then you don’t need to use sudo and mess up your system. If you’re already using rvm instead of rbenv, then stay with it and skip the rbenv installation steps.

@jirutka
jirutka / howto-gentoo.md
Last active March 16, 2021 18:14
Configuration of mdev (minimalistic Device Manager from Busybox) for a server system, where udev is really not necessary.

How to replace udev with mdev on Gentoo

  1. Ensure that you haven’t installed any package that needs udev:

     equery depends udev
    
  2. Disable USE udev in /etc/portage/make.conf.

  3. Enable USE mdev for busybox (and disable pam, it supposedly doesn’t work with static well):

#!/bin/bash
# vim: tabstop=4
GRANT_TYPE='client_credentials'
############### Functions ###############
parse_json() {
local input=$1
local attr=$2
@jirutka
jirutka / example_non_styled.yml
Last active August 31, 2021 16:40 — forked from mislav/example.rb
A Psych extension to enable choosing output styles for specific objects.
# default boring output of Psych.dump
---
:response:
:body: ! "{\n \"page\": 1,\n \"results\": [\n \"item\", \"another\"\n ],\n
\ \"total_pages\": 0\n}\n"
:status: 200
:person:
name: Steve
age: 24
:array:
@jirutka
jirutka / pg_change_db_owner.sh
Last active February 6, 2024 20:01
Some convenient scripts to manage ownerships and privileges in PostgreSQL.
#!/bin/sh
#
# The MIT License
#
# Copyright 2014-2017 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@jirutka
jirutka / -README.md
Last active October 31, 2023 09:07
How to use terminal on Windows and don’t go crazy…

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings
@jirutka
jirutka / sample.png
Last active April 26, 2023 14:03
Nested numbered list with correct indentation in CSS. Live example at http://jsfiddle.net/a84enL8k/.
sample.png
@jirutka
jirutka / README.adoc
Last active August 29, 2015 14:07
Twitter statistics for #LinuxDays 2014

Twitter statistics for #LinuxDays 2014

  • Number of tweets (excluding RTs): 359

  • Number of tweeting users: 107

TOP tweeting users

Rank

User

Tweets

@jirutka
jirutka / README.md
Last active February 15, 2016 21:01
Some experimental filters for OpenSMTPD.

Warning: Filter API is not stable yet.

Filters are not triggered when sending e-mail directly using the sendmail command.

@jirutka
jirutka / gitlab-sidekiq.conf
Last active March 18, 2016 05:28
Upstart job configuration files (aka runscripts) for GitLab CE.
#!upstart
description "GitLab (Sidekiq)"
author "Jakub Jirutka"
start on starting gitlab
stop on stopping gitlab
env sidekiq_logfile="/var/log/gitlab/sidekiq.log"
env sidekiq_queues="-q post_receive -q mailer -q system_hook