Skip to content

Instantly share code, notes, and snippets.

View askb's full-sized avatar

askb askb

View GitHub Profile
Jenkins.instance.pluginManager.plugins.each{
plugin ->
println ("${plugin.getDisplayName()} (${plugin.getShortName()}): ${plugin.getVersion()}")
}
### Keybase proof
I hereby claim:
* I am askb on github.
* I am askb (https://keybase.io/askb) on keybase.
* I have a public key whose fingerprint is DBE2 4D9E 8ECC 5B29 5F33 FF61 A468 00C5 D9A8 855E
To claim this, I am signing this object:
@askb
askb / apt-lock.sh
Created October 31, 2017 22:40
Workaroud for apt "Could not get lock /var/lib/dpkg/lock"
#
# E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
# E: Unable to lock the administration directory (/var/lib/dpkg), is another process using
# Wait for any background apt processes to finish
# There seems to be a backgroud apt process that locks /var/lib/dpkg/lock
# and causes our apt commands to fail.
while pgrep apt > /dev/null; do sleep 1; done
@askb
askb / gist:e72c21c944524b0e5db33e5dbce418cb
Created November 14, 2017 20:56
exit: : numeric argument required
#!/bin/bash -x
function bugid_to_jira_task() {
local jira_url="${1}"
local project="${2}"
local bug_id="${3}"
local resp=$(curl -sS --stderr -w {%http_code} --H "Accept: application/json" "${jira_url}/rest/api/2/search\?jql\=project\=${project}%20and%20\\"External%20issue%20ID\\"\~${bug_id}")
echo "$resp"
local issue_id=$(echo "$resp"| jq -r '.issues[].key')
@askb
askb / gist:78eeec07b75024abd87a3506a7409e63
Created March 2, 2018 01:38
Update sysstat polling frequency to 1 minute and restart service on Ubuntu 16.04
sudo apt-get install sysstat -y
sudo sed -i -e 's#ENABLED="false"#ENABLED="true"#' /etc/default/sysstat
sudo sed -i -e 's#5-55/10#5-55/1#' /etc/cron.d/sysstat
sudo systemctl restart sysstat.service
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2017 The Linux Foundation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
##############################################################################
@askb
askb / gist:189f18ab163b7fdd97b8b0adac6e18cf
Created November 3, 2018 02:28
dnf system-upgrade errors
$ sudo dnf system-upgrade download --refresh --releasever=29
[sudo] password for '':
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
Fedora 29 - x86_64 - Updates 1.3 MB/s | 5.5 MB 00:04
Failed to synchronize cache for repo 'spartacus06-yubikey-utils', disabling.
Failed to synchronize cache for repo 'docker-ce-stable', disabling.
Failed to synchronize cache for repo 'fedora-infra-sigul', disabling.
Failed to synchronize cache for repo 'virtualbox', disabling.
Last metadata expiration check: 0:00:00 ago on Sat 03 Nov 2018 12:22:35 PM AEST.
Error:
@askb
askb / gist:9050aff113b4a028a28ea2511f8b56d2
Last active October 20, 2020 01:30
Autorelease git-log: stable/aluminium - CR's committed/merged for the last one month
// CR coming into AR on the stable/aluminum branch on each day for the one month period.
$ git submodule foreach "git log --oneline --graph --decorate --no-merges --pretty='format:%as %h' --since=1.month.ago" | grep -v Entering | awk -F' ' -e '{print $2}' | sort | uniq
2019-07-23
2020-05-25
2020-06-30
2020-08-04
2020-08-23
2020-08-24
@askb
askb / gist:850fcf1abb8c4815da87dda50abc8f8c
Last active October 20, 2020 01:30
Autorelease git-log: master - CR's committed/merged for last one months
// CR coming into AR on the master branch on each day for the one month period.
$ git submodule foreach "git log --oneline --graph --decorate --no-merges --pretty='format:%as %h' --since=1.month.ago" #| grep -v Entering | awk -F' ' -e '{print $2}' | sort | uniq
Entering 'aaa'
Entering 'bgpcep'
Entering 'controller'
* 2020-10-13 5ed0b16605
Entering 'daexim'
Entering 'genius'
Entering 'infrautils'
@askb
askb / gist:66e8cd9336d6de11b2861533e0d267cd
Last active October 20, 2020 01:30
Autorelease git-log: stable/magesium - CR's committed/merged for last one months
// CR coming into AR on the stable/magnesium branch on each day for the one month period.
$ git branch
* (HEAD detached at origin/stable/magnesium)
master
stable/magnesium
$ git submodule foreach "git log --oneline --graph --decorate --no-merges --pretty='format:%as %h' --since=1.month.ago"
Entering 'aaa'
Entering 'bgpcep'