Skip to content

Instantly share code, notes, and snippets.

global {
minor-count 5;
dialog-refresh 1;
usage-count no;
}
common {
}
#
# 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"
@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 \
/*
* 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);
/*
* 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');
<?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;
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();
<?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>
@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