Skip to content

Instantly share code, notes, and snippets.

@halyph
halyph / gist:2948778
Created June 18, 2012 14:57
trusted Maven repositories
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Maven Repository Group</name>
<url>http://repository.jboss.com/maven2</url>
</repository>
<repository>
<id>repo2_maven_org</id>
<url>http://repo2.maven.org/maven2</url>
</repository>
<repository>
@halyph
halyph / pom.xml
Created July 21, 2012 09:05 — forked from gordonad/pom.xml
Spring Best Practices Maven Pom
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gordondickens.sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
@halyph
halyph / run script
Created August 14, 2012 09:07
Notepad++ Ruby script run
cmd /C jruby "$(FULL_CURRENT_PATH)" & pause
cmd /K jruby "$(FULL_CURRENT_PATH)"
oivasiv@IF006 /d/MyProjects/GitHub/gitflow_test2
$ touch README.md
oivasiv@IF006 /d/MyProjects/GitHub/gitflow_test2
$ git init
Initialized empty Git repository in D:/MyProjects/GitHub/gitflow_test2/.git/
oivasiv@IF006 /d/MyProjects/GitHub/gitflow_test2 (master)
$ git add README.md
@halyph
halyph / gist:3369405
Created August 16, 2012 11:18
Add custom #git #commands
  • Add to $PATH variable folder with git related scripts
$ export PATH=$PATH:/d/MyProjects/GitHub/scripts
  • To have command like:
$ git <mycommand>

you should create script with the next naming convention

@halyph
halyph / sample
Created August 16, 2012 13:10
msysgit shell ANSI color echo
$ echo -e "\033[31mCompiling foo.c\033[0m \033[33mCompiling foo.c\033[0m"
@halyph
halyph / gist:3502664
Created August 28, 2012 19:11
#git Setup Line Ending Preferences

for Unix/Mac users:

Execute:

$ git config --global core.autocrlf input

$ git config --global core.safecrlf true
@halyph
halyph / gist:3526022
Created August 30, 2012 10:37
#git set http.proxy
$ git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
@halyph
halyph / gist:3657075
Created September 6, 2012 14:58
Convert UNIX files to DOS format fot all untracked file in f#git
$ git status --untracked-files=all -s | grep "^??" | cut -c 4- | while read line; do dos2unix -D "${line}"; done
@halyph
halyph / gist:3699280
Created September 11, 2012 14:46
Msys alias, #git, #shell, #bash #profile

MSYS: alias resets upon restarting MSYS console

Change to user directory:

cd ~

Append to .profile (which will run upon every new bash session):

echo -e "\nalias <myalias>=\"<custom command>"" >> .profile