Skip to content

Instantly share code, notes, and snippets.

@reneolivo
reneolivo / README.md
Created April 15, 2021 11:40
CiviCRM Extension Downloader

Usage

download-extension uk.co.compucorp.civicase https://github.com/compucorp/uk.co.compucorp.civicase/archive/1.14.0.zip
@reneolivo
reneolivo / index.js
Created June 22, 2020 23:24
List and Update Drupal Modules
const glob = require('glob');
const { readdirSync, createReadStream } = require('fs');
const { createInterface } = require('readline');
const { execSync } = require('child_process');
// 1) - For listing all modules and their versions:
// (async () => console.table(await getModulesList()))();
// 2) - For updating modules one by one:
@reneolivo
reneolivo / README.md
Last active December 27, 2018 18:36
FE Journal
@reneolivo
reneolivo / readme.md
Last active August 28, 2018 00:33
CiviHR's Model Factory

CiviHR's Model Factory proposal

Overview

The current structure for models, instances, and apis offer a way to access and manipulate CiviHR's data while separating each responsibility into clear distinctive units.

Unfortunately, current implementations have a lack of cohesion, different services implement the same methods with slight variations, lack of inheritance, spec files repeat the same tests, and instance services are created without a purpose, just to follow the convention.

This document will address these issues and propose solutions for them.

@reneolivo
reneolivo / case.model.js
Created April 20, 2018 18:54
Model Factoy proposal
define([
'common/modules/models'
], function (models) {
'use strict';
CaseModel.$inject = ['CaseInstance', 'ModelFactory'];
models.factory('Case', CaseModel);
function CaseModel (CaseInstance, ModelFactory) {
@reneolivo
reneolivo / index.html
Last active November 27, 2017 21:55
Leave Request Details modal
<div>
<modal
name="ToilLeaveRequestDetails"
title="Accrue TOIL for additional work"
is-open="false">
<leave-request-details-type type="toil" leave-request="leaveRequest"></leave-request-details-type>
</modal>
<button open-modal="ToilLeaveRequestDetails">
Record a new Toil Accrual
@reneolivo
reneolivo / app.html
Last active August 28, 2016 05:59
Messing with Aurelia
<template>
<h1>Sample App</h1>
<require from="./container"></require>
<require from="./column"></require>
<require from="./person-form"></require>
<container records.bind="records" form.bind="personForm">
<column header="Full Name">${firstName} ${lastName}</column>
<column header="Job Title">${job}</column>
@reneolivo
reneolivo / app.html
Created August 27, 2016 23:51 — forked from ZoolWay/app.html
Aurelia Child
<template>
<h1>${message}</h1>
<div>Div Content</div>
</template>
@reneolivo
reneolivo / app.html
Last active May 12, 2020 12:51 — forked from JeroenVinke/app.html
Aurelia Templating Child/Children Bug
<template>
<h1>Bug Example</h1>
<router-view></router-view>
</template>