Skip to content

Instantly share code, notes, and snippets.

View Aricg's full-sized avatar

Aric Gardner Aricg

View GitHub Profile
@Aricg
Aricg / gist:56f1a769cbdcbb93b459
Last active June 12, 2023 09:43
Enable gerrit replication to github
Gerrit version 2.8
Replication plugin extracted from gerrit.war and installed over ssh
Installation method ->
a) Relevant configs:
/var/lib/gerrit/etc/replication.config
[remote "aricg-compliance"]
url = git@github.com:somerepo/${name}.git
#!/bin/bash
#get lftools patchset that can create jira projects.
#lftools.
git clone ssh://agardner@gerrit.linuxfoundation.org:29418/releng/lftools
cd lftools
git review -d 15430
source ~/.venvpy3-feb/bin/activate
pip uninstall lftools
pip install -e .
#####
White:
Ricky
Aric
Greg
Abrams
Sandro
Felix
G - joseph weimers
Black:
@Aricg
Aricg / gist:3948021
Created October 24, 2012 18:48
remove rabbitmq and start again
#!/bin/bash
/etc/init.d/rabbitmq-server stop
for x in $(ps -ef | grep -v grep | grep rabbit | awk '{print $2}'); do kill -9 $x; echo "Process id $x is killed"; done
rm /var/lib/rabbitmq/.erlang.cookie
rm -rf /var/lib/rabbitmq/mnesia/
rm -rf /etc/rabbitmq/
apt-get remove --purge rabbitmq-server
apt-get autoremove
$ ssh -p 29418 agardner@gerrit.o-ran-sc.org
**** Welcome to Gerrit Code Review ****
Hi Aric Gardner, you have successfully connected over SSH.
Unfortunately, interactive shells are disabled.
To clone a hosted Git repository, use:
git clone ssh://agardner@gerrit.o-ran-sc.org:29418/REPOSITORY_NAME.git
rtdv3 jobs readme
https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/jjb/lf-rtdv3-jobs.html
#Clone repo:
$ git clone "ssh://agardner@gerrit.onap.org:29418/aaf/authz"
Cloning into 'authz'...
remote: Counting objects: 24, done
remote: Total 33524 (delta 0), reused 33524 (delta 0)
Receiving objects: 100% (33524/33524), 25.18 MiB | 6.60 MiB/s, done.
@Aricg
Aricg / gist:5375218
Created April 12, 2013 21:21
watch a log file, echo anything it produces into a fifo
#!/bin/bash
search_str="$1"
pipe=/tmp/alert
trap "rm -f $pipe" EXIT
rm -f $pipe
if [[ ! -p $pipe ]]; then
mkfifo $pipe
fi
#!/bin/bash -l
# SPDX-License-Identifier: EPL-1.0
##############################################################################
# Copyright (c) 2018 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
##############################################################################
16:04:05 ---> tox-run.sh
16:04:05 ---> Setting up pyenv
16:04:05 /usr/bin/pip
16:04:05 Python 2.7.5
16:04:05 Python 3.6.8
16:04:05 pip 19.3.1 from /home/jenkins/.local/lib/python3.6/site-packages/pip (python 3.6)
16:04:06 pip 8.1.2 from /usr/lib/python2.7/site-packages (python 2.7)
16:04:06 3.14.0 imported from /home/jenkins/.local/lib/python3.6/site-packages/tox/__init__.py
16:04:06 registered plugins:
16:04:06 tox-pyenv-1.1.0 at /home/jenkins/.local/lib/python3.6/site-packages/tox_pyenv.py
sudo yum -y install python36 python36-devel python36-pip python36-setuptools python36-virtualenv
sudo alternatives --list | grep -i python
sudo alternatives --install /usr/bin/python python /usr/bin/python3.6 2
sudo alternatives --install /usr/bin/python python /usr/bin/python2.7 1
#This wont work, becasue pip is not a symlink!
#sudo alternatives --install /usr/bin/pip pip /usr/bin/pip3.6 1
echo "Check python"
python -m pip --version