Skip to content

Instantly share code, notes, and snippets.

@yorammi
yorammi / 0_reuse_code.js
Created January 20, 2014 16:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yorammi
yorammi / 2repos-sync.sh
Last active January 11, 2024 07:25
Sync 2 remote repositories script - Just define the 3 variables (use export command for that!)
#!/bin/bash
# REPO_NAME=<repo>.git
# ORIGIN_URL=git@<host>:<project>/$REPO_NAME
# REPO1_URL=git@<host>:<project>/$REPO_NAME
rm -rf $REPO_NAME
git clone --bare $ORIGIN_URL
if [ "$?" != "0" ]; then
echo "ERROR: failed clone of $ORIGIN_URL"
@yorammi
yorammi / JenkinsPostBuildChangeStatus.gvy
Last active April 23, 2019 20:58
Groovy PostBuild step code for changing the job build status if certain text appear in the build log ourput
errpattern = ~/TEXT-TO-LOOK-FOR-IN-JENKINS-BUILD-OUTPUT.*/;
manager.build.logFile.eachLine{ line ->
errmatcher=errpattern.matcher(line)
if (errmatcher.find()) {
manager.build.@result = hudson.model.Result.NEW-STATUS-TO-SET
}
}
@yorammi
yorammi / GitCommitsVsBranchesTable.sh
Created November 2, 2016 12:34
Generate CSV file that lists all commits - since certain date - and lists all the branches each commit resides in
#!/bin/bash
# Script arguments:
# SINCE - Date (format: MMM DD YYYY, e.g. Nov 1 2016) for list all commit since until now
# branches - comma-seperated list of branches to be set as columns in the resulted table
# the path to the resulted CSV file
CSV_FILE=COMMITS_REPORT.csv
# list all commits since given argument

Keybase proof

I hereby claim:

  • I am yorammi on github.
  • I am yorammi (https://keybase.io/yorammi) on keybase.
  • I have a public key ASDPEmVMngVeXXf1MLx_L392cOQNwVclWdwXj-2SzfKyjgo

To claim this, I am signing this object:

@yorammi
yorammi / Jenkins-Pipeline-101-and-TCI-workshop.md
Last active November 16, 2019 23:35
Jenkins Pipeline 101 and TCI workshop information page

Jenkins Pipeline 101 and TCI workshop

Steps to load a TCI server

  • Create a workspace folder and work in it - e.g.
   mkdir ~/tciWorkshop && cd ~/tciWorkshop
  • clone the tci-server and tci-cust repositories: