Skip to content

Instantly share code, notes, and snippets.

@atj
atj / replacemulti.py
Created Mar 31, 2021
Add a $replacemulti to Picard
View replacemulti.py
#!/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
View naemon configure on openSUSE 11.4
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 Mar 16, 2011
Log excerpt showing time taken to render menu structure with page translations enabled
View refinerycms menu rendering log
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
View project.rb
class Project < ActiveRecord::Base
acts_as_indexed :fields => [
:title, :description, :website
]
validates_presence_of :title, :description
validates_uniqueness_of :title
acts_as_nested_set