Skip to content

Instantly share code, notes, and snippets.

View mmalmeida's full-sized avatar

Miguel Almeida mmalmeida

  • ITClinical
  • Lisbon
View GitHub Profile
private static final String DEACTIVATE = "deactivate";
private static final String ACTIVATE = "activate";
@Before
public void setUp() {
super.setUp();
}
INSERT INTO audit.car(
id, "year", investigator_id)
VALUES (16, 1990, null),(11, 19920, null);
<script type="text/javascript">
$(document).ready(function(){
$('.pagelinks a').click(function(event) {
event.preventDefault();
$.ajax({
url:$(this).attr('href'),
cache: false,
success: function (html) {
@mmalmeida
mmalmeida / flexget error
Created May 20, 2012 15:04
flexget crontab error
Traceback (most recent call last):
File "/usr/local/bin/flexget", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2707, in <module>
working_set.require(__requires__)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: FlexGet==1.0r2334
@mmalmeida
mmalmeida / gist:2758465
Created May 20, 2012 15:11
flexget upgrade error
2012-05-20 16:10 ERROR schema Failed to upgrade database for plugin series: (OperationalError) index ix_episode_releases_episode_id already exists u'CREATE INDEX ix_episode_releases_episode_id ON episode_releases (episode_id)' ()
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/flexget/schema.py", line 94, in upgrade_wrapper
new_ver = func(ver, session)
File "/usr/local/lib/python2.7/dist-packages/flexget/plugins/filter/series.py", line 68, in upgrade
Index('ix_episode_releases_episode_id', release_table.c.episode_id).create(bind=session.bind)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 2253, in create
bind._run_visitor(ddl.SchemaGenerator, self)
File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2302, in _run_visitor
conn._run_visitor(visitorcallable, element, **kwargs)
miguel@servidor:~$ flexget -v
2012-05-20 16:09 INFO util.log Adding index to md5sum column of log_once table.
2012-05-20 16:09 INFO schema Plugin `log_once` schema upgraded successfully
2012-05-20 16:09 INFO util.simple_persistence Creating index on simple_persistence table.
2012-05-20 16:09 INFO schema Plugin `simple_persistence` schema upgraded successfully
2012-05-20 16:09 INFO schema Plugin `api_tvdb` schema upgraded successfully
2012-05-20 16:09 INFO series Creating index on episode_releases table.
2012-05-20 16:09 INFO series Adding `name_lower` column to series table.
2012-05-20 16:09 INFO series Adding `identified_by` column to episodes table.
^CTraceback (most recent call last):
@mmalmeida
mmalmeida / dovecot.conf
Created May 20, 2012 18:58
dovecot config - doveconf -n
# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-24-generic i686 Ubuntu 12.04 LTS
auth_mechanisms = plain login
disable_plaintext_auth = no
info_log_path = /var/log/dovecot.info
log_path = /var/log/dovecot.err
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:~/Maildir
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii$
socket listen {
master {
# Master socket provides access to userdb information. It's typically
# used to give Dovecot's local delivery agent access to userdb so it
# can find mailbox locations.
path = /var/run/dovecot/auth-master
mode = 0600
# Default user/group is the one who started dovecot-auth (root)
user = mail
group = mail
<jee:jndi-lookup jndi-name="java:comp/env/my.env" id="currentEnvironment"
/>
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:security.properties</value>
<value>#{'classpath:/environments/iwrs-' + currentEnvironment +'.properties'}</value>
</list>
</property>
Cobertura: Loaded information on 17 classes.
Cobertura: Saved information on 17 classes.
[INFO]
[INFO] <<< cobertura-maven-plugin:2.5.1.1:cobertura (default-cli) @ querymanagement <<<
[INFO]
[INFO] --- cobertura-maven-plugin:2.5.1.1:cobertura (default-cli) @ querymanagement ---
[INFO] Cobertura 1.9.4.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Cobertura: Loaded information on 17 classes.
Report time: 2161ms