Skip to content

Instantly share code, notes, and snippets.

@maselpopowo
maselpopowo / git_config
Last active January 15, 2019 12:20
Git configuration
#Username
git config --global user.name "Marcin Kunicki"
git config --global user.email masel.popowo@gmail.com
# Color for ui
git config --global color.ui true
# Linux
git config --global core.autocrlf input
@maselpopowo
maselpopowo / maps.java
Created July 30, 2013 19:02
Google maps markers bug
Intent intent = new Intent(android.content.Intent.ACTION_VIEW,
Uri.parse("geo:"+latitude+","+longitude+"?q="+latitude+","+longitude+"("+name+")"));
intent.setComponent(new ComponentName("com.google.android.apps.maps", "com.google.android.maps.MapsActivity"));
startActivity(intent);
@maselpopowo
maselpopowo / JodaTimeTest.java
Created February 28, 2013 21:05
Find days between two Dates using Joda-Time
//nowy obiekt LocalDate ze Stringu (np. z bazy danych)
DateTimeFormatter forrmater = DateTimeFormat.forPattern("YYYY-MM-dd");
LocalDate ld = forrmater.parseLocalDate("2013-02-09");
System.out.print("LocalDate ld: ");
System.out.println(ld.toString());
//różnica miedzy dwoma datami w dniach
LocalDate startDate = forrmater.parseLocalDate("2013-02-09");
LocalDate stopDate = forrmater.parseLocalDate("2013-02-12");