Skip to content

Instantly share code, notes, and snippets.

@manojiksula
manojiksula / Jenkinsfile
Created July 13, 2019 07:34 — forked from merikan/Jenkinsfile
Some Jenkinsfile examples
Some Jenkinsfile examples
@manojiksula
manojiksula / excel_to_array.php
Created July 10, 2019 14:04 — forked from lastguest/excel_to_array.php
Read an Excel sheet as PHP array. (Needs PHPExcel)
<?php
// Needs PHPExcel
// https://phpexcel.codeplex.com/
function excel_to_array($inputFileName,$row_callback=null){
if (!class_exists('PHPExcel')) return false;
try {
$inputFileType = PHPExcel_IOFactory::identify($inputFileName);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$objPHPExcel = $objReader->load($inputFileName);
def getProjectName() {
return 'JenkinsPipeline'
}
def getJDKVersion() {
return 'jdk1.8.0_101'
}
def getMavenConfig() {
return 'maven-config'
# v. 20180110
TARGET=/var/www/B2C_America_PA/html
TMPTARGET=$TARGET/../html-in-progress
BACKUP=$TARGET/../html-backup
USER=apache
GROUP=apache
echo "Temporary folder: $TMPTARGET"
echo "Workspace folder: $WORKSPACE"
public static function ansiEncode($array = array(), $fields = array()) {
if(!empty($array)) {
for($i = 0; $i < count($array); $i++) {
foreach($fields as $key => $value) {
try {
@manojiksula
manojiksula / Jenkinsfile
Created December 16, 2018 16:48 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
@manojiksula
manojiksula / gitcom.md
Created December 15, 2018 16:48 — forked from jednano/gitcom.md
Common git commands in a day-to-day workflow

Git Cheat Sheet

Initial Setup

Create an empty git repo or reinitialize an existing one

$ git init
@manojiksula
manojiksula / magento_javascript_formvalidation.js
Created December 9, 2018 07:49 — forked from obiyoda/magento_javascript_formvalidation.js
Call the magento javascript form validation
//form-validate is the id of the form
var dataForm = new VarienForm('form-validate', true);
if(dataForm.validator.validate()){
//do stuff here when the form is validated
}
login url
<?php echo Mage::getUrl('customer/account/login'); ?>
logout url
<?php echo Mage::getUrl('customer/account/logout'); ?>
My Account url
<?php echo Mage::getUrl('customer/account'); ?>
Register url

STEPS

  • Click on Help menu

  • Select Enter License

  • Then paste given KEY given at bottom

  • Finally click on Use License