Skip to content

Instantly share code, notes, and snippets.

Kristian Cabading kcabading

Block or report user

Report or block kcabading

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kcabading /
Created Feb 28, 2018
Bash script for deploying Wordpress using Jenkins and Bitbucket.
# [STAGING_FOLDER] - staging directory in your server
# [STAGING_URL] - staging url
# [STAGING_USER] - staging user in the server
# [STAGING_MYSQLUSER] - staging mysql user
# [STAGING_MYSQLPASSWORD] - staging mysql password
# [ROOTUSER] - Mysql root user
# [ROOTPASSWORD] - Mysql root password
kcabading / .gitignore
Created Feb 6, 2018
Bare gitignore file for Wordpress for Gobro
View .gitignore
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# ver 20150227
# This file is tailored for a WordPress project
# using the default directory structure
kcabading / gist:3fe0d6026f8dda7210838fd07837b748
Created Feb 21, 2017
Initialising select2 in sugarcrm sidecar with options to load default list using an app_strings_list or from module's records.
View gist:3fe0d6026f8dda7210838fd07837b748
_render: function() {
// load default options using app strings
this._setSelectField("element_id_here", "", app.lang.getAppListStrings("cstm_lead_source_list") , false, null, null, null);
// if you want to load default selected value
// load options from records of a module
this._setSelectField("element_id_of_the_field", "", null, "Accounts", "name", this.getPersonRecordList);
getPersonRecordList: function(strName, strModule, fieldname, callback) {
kcabading / joi-parse-validation.js
Created Feb 21, 2017
JS helper to Parse validation errors and messages returned by
View joi-parse-validation.js
'use strict';
const _ = require('lodash');
const parseReason = function (message) {
const regexBecause = /because \[(.*?)(\]|$)/;
let parsedMessage = message;
if (regexBecause.test(message)) {
parsedMessage = regexBecause.exec(message)[1];
You can’t perform that action at this time.