Skip to content

Instantly share code, notes, and snippets.

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

Jakub Jirutka jirutka

🇺🇦
Слава Україні!
View GitHub Profile
@jirutka
jirutka / update-issue
Last active October 21, 2016 00:21
This script adds “primary” IP addresses (both IPv4 and IPv6) of the machine to /etc/issue (text for login screen). Add it to /etc/network/if-post-up.d and /etc/network/if-post-down.d.
#!/bin/sh
msg_file='/etc/issue'
test_ips='208.67.222.222 2620:0:ccc::2'
my_ips=$(printf '%s\n' $test_ips \
| xargs -rn 1 ip route get 2>/dev/null \
| grep -v unreachable \
| sed -En 's/.* src ([0-9a-f.:]+) .*/\1/p' \
| xargs)
@jirutka
jirutka / README.adoc
Last active October 10, 2016 16:16
Twitter statistics for #LinuxDays 2016 (monthly)

Twitter statistics for #LinuxDays 2016 (monthly)

Tweets between 2016-09-10 and 2016-10-10

  • Number of tweets (excluding RTs): 372

  • Number of likes: 1310

  • Number of retweets: 433

  • Number of tweeting users: 145

@jirutka
jirutka / README.adoc
Created October 10, 2016 15:56
Twitter statistics for #LinuxDays 2016

Twitter statistics for #LinuxDays 2016

Tweets between 2016-10-07 and 2016-10-10

  • Number of tweets (excluding RTs): 341

  • Number of likes: 1220

  • Number of retweets: 395

  • Number of tweeting users: 132

@jirutka
jirutka / owncloud.conf
Created October 2, 2016 14:33
nginx config for ownCloud
# /etc/nginx/conf.d/owncloud.conf
upstream owncloud_fcgi {
server unix:/run/owncloud/fastcgi.sock;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name owncloud.example.org;
@jirutka
jirutka / git-deploy.sh
Created September 11, 2016 12:55
Script for deploying files to git, for example building documentation and deploying to gh-pages branch on GitHub. https://github.com/jirutka/rake-jekyll#deploy-to-git
#!/bin/sh
# vim: set ts=4:
set -e
: ${DEPLOY_BRANCH:="gh-pages"}
: ${SOURCE_BRANCH:="master"}
die() {
# bold red
@jirutka
jirutka / string_interpolation.lua
Created September 4, 2016 19:34
String interpolation in Lua
--- Add support for interpolation into string using %.
--
-- Examples:
-- "Hi, %s!" % 'Mindy' --> Hi, Mindy!
-- "Hi, ${name}!" % {name = 'Mindy'} --> Hi, Mindy!
getmetatable('').__mod = function(str, args)
if type(args) ~= 'table' then
args = { args }
end
return str:format(unpack(args)):gsub('($%b{})', function(placeholder)
@jirutka
jirutka / abuild-can-remove
Last active September 13, 2021 17:50
Some helper scripts for checking dependencies of Alpine packages.
#!/bin/sh
#
# This scripts checks the given list of packages if they have
# reverse dependencies (i.e. there are packages which depends on them).
# Dependencies that are on the list are excluded.
#
# Usage: $0 LIST
set -eu
SCRIPT_DIR="$(dirname "$(readlink -f "$0")")"
@jirutka
jirutka / config.lua.example
Last active August 22, 2016 23:16
Lua script for synchronization of Git mirrors that uses MQTT to get notified about changes in the origin repositories.
mqtt_host = 'mqtt.example.org'
mqtt_topics = {
'git/foo/+',
'git/bar/+',
}
origin_url = 'git://git.example.org/%s'
mirror_url = '[email protected]:example/%s.git'
@jirutka
jirutka / bootstrap
Created July 27, 2016 17:23
Python Scripts To Rule Them All ™
#!/bin/sh
# vim: set ts=4:
#
# Ensures that Python 3.4+ is available and installs modules specified
# in requirements-dev.txt.
#
# Environment variables:
# PYTHON : Python executable to use (default is python3 or python on PATH).
#
# This script follows convention https://github.com/github/scripts-to-rule-them-all.

UPDATE: Kdo si chcete jenom počíst a napsat mi, že byt nepotřebujete, tak prosím třeba přes Facebook https://www.facebook.com/lstrojil - děkuji, zájemci o byt prosím pište přes kontaktní formulář. :-)

Prodám byt. Je to moc hezký byt.

Přesto ho prodám. Jinak bych musel prodat děti a ženu a těch pár tun věcí, co nám tu společně nashromáždili.

Má všechno, co takový byt potřebuje: dveře (a ne jedny!), okna, podlahy, stropy, vodu, elektriku, sousedy, koupelnu, garáž, záchod, internet, sklep, komoru, komodu, šatnu, atmosféru, hypotéku...