Skip to content

Instantly share code, notes, and snippets.

View nickboldt's full-sized avatar

Nick Boldt nickboldt

View GitHub Profile
#!/bin/bash
COUNTER=1
LOG="${0}.log.txt"
OPTS='-o NumberOfPasswordPrompts=0 -o BatchMode=yes -o ConnectTimeout=3'
rm -f ${LOG}
while [[ $COUNTER -lt 10 ]]; do
echo "=== dev0${COUNTER} ===" | tee -a ${LOG};
ssh dev0${COUNTER} ${OPTS} "uname -a;uname -r;uname -m; yum list installed | egrep \"^gtk2\.|^gtk3\.|^webkit\"" 2>&1 | tee -a ${LOG} ; echo "" | tee -a ${LOG}
(( COUNTER++ ))
@nickboldt
nickboldt / install-jbds-is.sh
Last active August 29, 2015 14:02
Headless install of JBDS IS into JBDS 7.x from Update Site zip
#!/bin/bash
# set working folder
WORKSPACE=/tmp
cd ${WORKSPACE}
# set path to JBoss Developer Studio install folder
JBDS=${HOME}/jbdevstudio7.1.1.GA/studio
# set path to JBDS IS update site zip
@nickboldt
nickboldt / gitco
Created November 18, 2014 22:53
git checkout from someone's topic branch, without having to first add the remote and fetch a list of latest branches; also works with pull requests by delegating to hub
#!/bin/bash
usage ()
{
echo "Usage: $0 <URL for topic branch or PR>"
echo "Example 1: $0 https://github.com/robstryker/jbosstools-server/tree/integration_tests"
echo "Example 2: $0 https://github.com/jbdevstudio/jbdevstudio-devdoc/pull/118"
exit 1;
}
@nickboldt
nickboldt / Inateck_BTA-BC4B6_Installation.adoc
Last active August 29, 2015 14:11
Inateck BTA-BC4B6 Installation

Drivers on website [1] are the same version as those on the CD (website last updated Oct 12 2014, CD received in Dec 2014): Broadcom BCM20702 Bluetooth 4.0 USB Device, driver version 12.0.0.8030.

Had to install twice - first time wasn’t prompted to reboot, so nothing worked. Upon reboot, device worked perfectly & connected easily.

HOWEVER, Windows uninstalled my Intel BT drivers, so when I wanted to switch back to my built-in bluetooth driver (Intel® PROSet/Wireless Software for Bluetooth® Technology) I had to reinstall that, which in turn disabled the Inateck device (Broadcom) in Device Manager > Bluetooth.

@nickboldt
nickboldt / git-check-if-branches-exist.sh
Last active August 29, 2015 14:15
check git for existence of branches (code freeze requirement - have app the projects branched yet?)
#!/bin/bash
# moved to https://github.com/jbosstools/jbosstools-build-ci/blob/master/util/checkIfBranchesExist.sh
debug=0
usage ()
{
echo "Usage: $0 -b newbranchname [project1] [project2] [project3] ..."
echo "Example: $0 -b jbosstools-4.3.0.Alpha1x aerogear arquillian base birt browsersim central forge \\"
@nickboldt
nickboldt / p2diff-check.sh
Last active September 23, 2015 13:40
Find IUs added/removed from a p2diff report
#!/bin/bash
tmpdir=/tmp/p2diff-check; mkdir -p $tmpdir
# first, create a p2diff report, eg.,
# ./p2diff \
# http://download.jboss.org/jbosstools/targetplatforms/jbosstoolstarget/4.51.0.Final/REPO/ \
# file:/home/mistria/git/jbosstools-target-platforms/jbosstools/multiple/target/jbosstools-multiple.target.repo/ \
# > $tmpdir/p2diff.txt
inputfile=$tmpdir/p2diff.txt
if [[ $1 ]]; then inputfile="$1"; fi
@nickboldt
nickboldt / SVN To GitHub Migration
Created September 11, 2012 20:04
SVN To GitHub Migration
== Migration from SVN to Git ==
This operation will require a fair amount of disk. Each copy of the overall jbosstools-svn-mirror git repo is about 2.6Gb.
After the migration, Freemarker was only 4.4Mb.
1. Check out entire git repo:
git clone git@github.com:jbosstools/jbosstools-svn-mirror.git
or
git clone https://github.com/jbosstools/jbosstools-svn-mirror.git
@nickboldt
nickboldt / Using GGit within Eclipse or JBDS
Created September 11, 2012 20:04
Using EGit within Eclipse or JBDS
=== Installation ===
Fire up JBDS. Install EGit and the github connector, eg., from Central > Software/Update. Restart when prompted
=== Checking out a new project ===
File > Import > Git > Projects from Git > Next
GitHub > Next > "nickboldt/freemarker" > Search > select repo > Next
Select branches to fetch > Next > Next > Next > Finish
@nickboldt
nickboldt / run-clean-eclipse
Created November 1, 2012 15:37
Script to unpack Eclipse into reusable folder, with fresh workspace. Pass in -Dflags using single commandline arg in quotes
#!/bin/bash
# for new workspace:
# cd ~/eclipse/42clean; ./e e
# to reuse workspace:
# cd ~/eclipse/42clean; ./e
# to pass in -vmargs flags
# cd ~/eclipse/42clean; ./e e "-Dsomething=somevalue"
# or
# cd ~/eclipse/42clean; ./e "-Dsomething=somevalue"
@nickboldt
nickboldt / git workflow - applying a PR
Created November 9, 2012 19:13
git workflow - applying a PR
First, add this to your .gitconfig file:
[alias]
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %C(blue)%aE%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
Next, ensure you have the correct remotes configured for your local repo, eg. one for every user from which you'll pull a PR, and an origin:
$➔ git remote -v
mistria git://github.com/mickaelistria/jbosstools-build.git (fetch)
mistria git://github.com/mickaelistria/jbosstools-build.git (push)