This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#In a repo, returns a list of the numbers of commites per file ordered desc | |
git rev-list --objects --all | awk '$2' | sort -k2 | uniq -cf1 | sort -rn | | |
while read frequency sample path | |
do | |
[ "blob" == "$(git cat-file -t $sample)" ] && echo -e "$frequency\t$path"; | |
done | |
#search for remote branches with a specific name fo deleting afer | |
git fetch origin;git remote update origin --prune;git branch -r |grep WORDINNAME | |
#remove remote branches with the word "WORDINNAME" (use first git branch -r |grep WORDINNAME |sed 's/ origin\///' to be sure) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Ejecutar según tipo de test | |
mvn clean install -DskipUTs=true for skipping surefire tests. | |
mvn clean install -DskipITs=true for skipping failsafe tests. | |
mvn clean install -DskipTests=true for skipping all tests. | |
mvn clean install -Dmaven.test.skip=true neither compile test not execute them | |
#Test parciales | |
mvn -Dtest=TestCi*le test | |
mvn -Dtest=TestSquare,TestCi*le test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
# coding: latin-1 | |
import requests | |
import json | |
import time | |
import random | |
#******************** DISPO (AUTH) ******************************************** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[1;36m\]\t\[\033[00m\] [\w]\033[0;37m\]\$(parse_git_branch)\[\033[00m\] $ " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//La clase a testear | |
private OrderRepositorySQLQueries(){ | |
throw new UnsupportedOperationException(); | |
} | |
/** | |
* Utility class to test private constructor of utility classes. Those classes must return UnsupportedOperationException (and be final...) | |
* | |
* @param <T> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.util.Enumeration; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletContext; | |
import javax.servlet.ServletException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a file ~/.Xmodmap file looks like this: | |
clear control | |
clear mod1 | |
keycode 37 = Alt_L Meta_L | |
keycode 64 = Control_L | |
add control = Control_L Control_R | |
add mod1 = Alt_L Meta_L | |
Source: https://earthviaradio.wordpress.com/2012/02/06/swapping-the-left-alt-and-ctrl-keys-in-ubuntu-11-10/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Temprary spring configuration: | |
<bean id="originalCorsFilter" class="org.ebaysf.web.cors.CORSFilter"> | |
</bean> | |
<bean id="corsFilter" class=com.ib.framework.utils.cors.FilterDecoratorForSpring"> | |
<constructor-arg ref="originalCorsFilter"></constructor-arg> | |
<constructor-arg> | |
<map> | |
<entry key="cors.allowed.origins" value="*" /> |
NewerOlder