Skip to content

Instantly share code, notes, and snippets.

View mrVanboy's full-sized avatar

Ivan Boyarkin mrVanboy

View GitHub Profile
@mrVanboy
mrVanboy / codeclimate-to-markdown.md
Last active January 10, 2024 11:58
Markdown table from code-climate.json with jq

Example of the creating markdown table from the gl-code-quality-report.json Gitlab's code quality report with codeclimate SPEC.

  1. Install jq
  2. Run the next command to convert gl-code-quality-report.json to markdown:
    jq -r '. | sort_by((.location.path | explode | map(-.)), .location.lines.begin) | .[] | @text "| [\(.location.path):\(.location.lines.begin)](../blob/BRANCH-NAME/\(.location.path)#L\(.location.lines.begin)) | \(.description)"' gl-code-quality-report.json
  3. Add table header to the beggigning of the output:

| Path | Description |

Keybase proof

I hereby claim:

  • I am mrvanboy on github.
  • I am vnb (https://keybase.io/vnb) on keybase.
  • I have a public key ASCKhCtl0__CQpGQFpyKJwob_uTW86XbjvV0bEQ7Ob5qoAo

To claim this, I am signing this object:

@mrVanboy
mrVanboy / giltab-runner-local-docker.md
Last active June 26, 2023 07:22
Debugging Gitlab CI without installing gitlab-runner

Debugging Gitlab CI jobs locally

You can find a bunch of articles about debugging Gitlab CI jobs locally. My top results from google:

But in all that articles the described way is to install Docker and gitlab-runner executable, run gitlab-runner exec docker JOB_NAME_FROM_GITLAB_CI_YML after that in your repo.

I don't like this approach because I want a simpler way to run appropriate gitlab-runner executable and don't

@mrVanboy
mrVanboy / controllers.application.js
Last active April 24, 2017 12:32
test destroying
import Ember from 'ember';
let Prvek = Ember.Object.extend({
title: "I am prverk",
init(){
let pole = this.constructor.pole;
this.set('id',pole.length > 0 ? pole[pole.length-1].id + 1 : 0);
this.constructor.pole.pushObject(this);
},
willDestroy(){