Skip to content

Instantly share code, notes, and snippets.

View nickboldt's full-sized avatar

Nick Boldt nickboldt

View GitHub Profile
@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 - submitting a PR
Created November 9, 2012 19:12
git workflow - submitting 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
${GITUSER} git@github.com:nickboldt/jbosstools-build.git (fetch)
${GITUSER} git@github.com:nickboldt/jbosstools-build.git (push)
@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)
@nickboldt
nickboldt / .bashrc
Created November 11, 2012 16:19
bashrc file which tracks git status in my prompt
# .bashrc
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
@nickboldt
nickboldt / gitwork.sh
Last active February 14, 2020 16:12
script to automate git workflow, using topic branches & PRs
#!/bin/bash
# 4 steps in git workflow: prepare for work, (do work), pull-request, apply pull-request, drop topic branch
#alias gw1='~/bin/gitwork.sh 1 -t $topic -b $branch'
# do work after step 1
#alias gw2='~/bin/gitwork.sh 2 -t $topic -b $branch'
#alias gw3='~/bin/gitwork.sh 3 -t $topic -b $branch'
#alias gw4='~/bin/gitwork.sh 4 -t $topic -b $branch'
usage ()
@nickboldt
nickboldt / patch.sh
Created November 29, 2012 04:19
JBDS-2394 patch process
#!/bin/bash
# set path where you have JBDS 5 installed
JBDS5=${HOME}/jbdevstudio/studio
# fix plugin
cd ${JBDS5}/plugins/
cp org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final.jar org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394.jar
unzip org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394.jar -d org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
cd ${JBDS5}/plugins/org.jboss.ide.eclipse.as.core_2.3.1.v20120715-0243-H142-Final_patched_JBDS-2394
@nickboldt
nickboldt / jobs-toggle.sh
Created January 14, 2013 20:41
script to find disabled jobs and enable them, or enabled jobs and disable them
#!/bin/bash
if [ $# -eq 0 ]; then
echo "usage: $0 \"<dir(s)>\" <-d|-DISABLE|-e|-ENABLE> \"--include <include paths>\" \"--exclude <exclude paths>\""; echo "";
echo "example: $0 . -d --include \"component|updatesite|aggregate\" --exclude \"xulrunner\" "; echo "";
exit 1;
fi
# files to change
dirs=".";
@nickboldt
nickboldt / upversion.sh
Created January 16, 2013 17:19
bump tycho plugin/feature/pom versions
mvn -Dtycho.mode=maven org.sonatype.tycho:tycho-versions-plugin:set-version -DnewVersion=x.y.z-SNAPSHOT