Skip to content

Instantly share code, notes, and snippets.

View nijel's full-sized avatar

Michal Čihař nijel

View GitHub Profile
@nijel
nijel / settings.py
Created March 22, 2019 14:34
Webate checks configuration examples
#
# This example shows various ways to configure checks in Weblate
#
# In example settings CHECK_LIST is commented out, what leads to using
# default value - all checks are enabled
# CHECK_LIST = (
# 'weblate.checks.same.SameCheck',
# 'weblate.checks.chars.BeginNewlineCheck',
# 'weblate.checks.chars.EndNewlineCheck',
@nijel
nijel / luci_statistics.diff
Created March 9, 2017 16:24
/etc/config/luci_statistics changes after upgrade to Turris OS 3.6
diff --git a/turris/etc/config/luci_statistics b/turris/etc/config/luci_statistics
index d6a6237..de16f29 100644
--- a/turris/etc/config/luci_statistics
+++ b/turris/etc/config/luci_statistics
@@ -1,3 +1,4 @@
+# general settings
config statistics 'collectd'
option BaseDir '/var/run/collectd'
@@ -13,12 +14,14 @@ config statistics 'rrdtool'
@nijel
nijel / android-import-po
Last active November 1, 2023 09:10
Weblate snippets
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
@nijel
nijel / ttkit_units.py
Last active August 29, 2015 14:15
Count units in a translation file
from translate.storage import factory
import sys
f = factory.getobject(sys.argv[1])
print(
'File {0} has {1} units'.format(
sys.argv[1],
len(f.units)
)
@nijel
nijel / gist:377ce1b4dadedd1bb27f
Last active August 29, 2015 14:08
keybase.io

Keybase proof

I hereby claim:

  • I am nijel on github.
  • I am nijel (https://keybase.io/nijel) on keybase.
  • I have a public key whose fingerprint is 63CB 1DF1 EF12 CF2A C0EE 5A32 9C27 B313 42B7 511D

To claim this, I am signing this object: