Skip to content

Instantly share code, notes, and snippets.

@atj
atj / digital_release_availability.md
Created May 14, 2022 10:11
Digital release country availability
@atj
atj / replacemulti.py
Created March 31, 2021 20:54
Add a $replacemulti to Picard
#!/usr/bin/python
# -*- coding: utf-8 -*-
# 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 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
ajames@naemon:~/naemon-core> cat /etc/SuSE-release
openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon
ajames@naemon:~/naemon-core> uname -a
Linux naemon 2.6.37.6-24-desktop #1 SMP PREEMPT 2012-10-18 22:36:08 +0200 x86_64 x86_64 x86_64 GNU/Linux
ajames@naemon:~/naemon-core> zypper search -i
Loading repository data...
Warning: Repository 'Official released updates for openSUSE 11.4 (standard)' appears to outdated. Consider using a different mirror or server.
Reading installed packages...
@atj
atj / refinerycms menu rendering log
Created March 16, 2011 14:53
Log excerpt showing time taken to render menu structure with page translations enabled
Started GET "/" for 127.0.0.1 at Wed Mar 16 14:47:27 +0000 2011
SQL (2.2ms) SHOW TABLES
SQL (0.6ms) SHOW TABLES
SQL (0.7ms) SHOW TABLES
SQL (3.5ms) SHOW TABLES
SQL (1.2ms) SHOW TABLES
Processing by PagesController#home as HTML
Page::Translation Load (0.8ms) SELECT `page_translations`.* FROM `page_translations` WHERE `page_translations`.`locale` = 'en'
SQL (1.2ms) describe `roles_users`
Role Load (0.2ms) SELECT `roles`.* FROM `roles` WHERE `roles`.`title` = 'Refinery' LIMIT 1
class Project < ActiveRecord::Base
acts_as_indexed :fields => [
:title, :description, :website
]
validates_presence_of :title, :description
validates_uniqueness_of :title
acts_as_nested_set