Skip to content

Instantly share code, notes, and snippets.

@jonvargas
jonvargas / gist:3152496
Created July 20, 2012 18:43
Alfresco fails during upload after migration to Ubuntu 12.04
2012-07-19 21:00:06,327 ERROR [node.db.DeletedNodeCleanupWorker] [DefaultScheduler_Worker-5] Failed to purge nodes. If the purgable set is too large for the available DB resources
then the nodes can be purged manually as well.
Set log level to WARN for this class to get exception log:
Max commit time: 1340161200052
Error:
### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: update or delete on table "alf_node" violates foreign key constraint "fk_alf_cass_pnode" on table "alf_child_assoc"
Detail: Key (id)=(8753) is still referenced from table "alf_child_assoc".
### The error may involve alfresco.node.delete_NodesByTxnCommitTime-Inline
### The error occurred while setting parameters
### Cause: org.postgresql.util.PSQLException: ERROR: update or delete on table "alf_node" violates foreign key constraint "fk_alf_cass_pnode" on table "alf_child_assoc"
@jonvargas
jonvargas / cpuinfo.txt
Created August 17, 2012 00:05
OpenStack fails to launch VirtualMachine on Ubuntu 12.04
processor : 0
vendor_id : AuthenticAMD
cpu family : 16
model : 10
model name : AMD Phenom(tm) II X6 1090T Processor
stepping : 0
cpu MHz : 3197.748
cache size : 512 KB
physical id : 0
siblings : 2
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:app/controllers/SiteControllerwsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" name="app/controllers/SiteController" targetNamespace="urn:app/controllers/SiteControllerwsdl">
<wsdl:types>
<xsd:schema targetNamespace="urn:app/controllers/SiteControllerwsdl">
<xsd:complexType name="app\models\Post">
<xsd:all>
<xsd:element name="id" type="xsd:integer"/>
<xsd:element name="title" type="xsd:string"/>
</xsd:all>
function assignCompleteButtonToTaskForm ()
{
//alert ("initializing");
var completeButton = jQuery ('button.btn-task-form')[0];
var mainTaskForm = jQuery ('form.main-task-form')[0];
mainTaskForm.bind('submit', function(e) {
e.preventDefault();
this.submit();
<?php
use yii\web\View;
use yii\bootstrap\Progress;
use kartik\helpers\Html;
use kartik\grid\GridView;
use app\models\SampleTask;
use kartik\datecontrol\DateControl;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
<?php
use yii\web\View;
use yii\bootstrap\Progress;
use kartik\helpers\Html;
use kartik\grid\GridView;
use app\models\SampleTask;
use kartik\datecontrol\DateControl;
use kartik\widgets\ActiveForm;
use kartik\builder\Form;
/*
* Invokes que submission of the main task form, via a button placed outside the form.
* Also, requests for confirmation after the form validation passes correctly.
* @author: Jonathan Vargas
*/
function triggerTaskFormSubmit ()
{
// Finds required objects
var completeButton = jQuery ('button.btn-task-form')[0];
var mainTaskForm = jQuery('form.main-task-form');
/*
* Author: jonathan.vargas.cr
* Description:
*
* This script removes all popups displayed by La Nacion and El Financiero online newspapers.
* To apply, just open a Javascript console when you are reading an article, paste the script and execute it
*/
function byId (id) {
return document.getElementById(id);
@jonvargas
jonvargas / gist:efffb5ce059e54a96bdc
Created July 17, 2015 18:29
CRM Config for NFS SLES HA Cluster
node 167772676: rcp-portal-storage-sles12-a
node 167772677: rcp-portal-storage-sles12-b
primitive base-fs Filesystem \
params device="/dev/nfs_vg/nfs_lv" directory="/srv/nfs/example" fstype=btrfs \
op monitor interval=10s
primitive exportfs exportfs \
params fsid=1 directory="/srv/nfs/example" options="rw,mountpoint,no_root_squash" clientspec="*" wait_for_leasetime_on_stop=true \
op monitor interval=30s
primitive exportfs-root exportfs \
params fsid=0 directory="/srv/nfs" options="rw,crossmnt" clientspec="*" wait_for_leasetime_on_stop=true \
#
# This script should be loaded only from the "start" case in /etc/init.d/nfsserver, since
# Systemd intercepts the main init script execution and forgets about previously loaded
# settings.
#
# For more information about what these settings mean, read /etc/sysconfig/nfs.ha.bu
#
echo "Loading Local NFS Server settings"