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
[user] | |
name = Michal Lipski | |
email = kiwaczki_@gmail.com | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
ui = always | |
[alias] |
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 clean clone of the source repository: | |
git clone git://server.com/my-repo1.git | |
Nuke all the entries except the folder you need to move. Use the following command | |
git filter-branch --subdirectory-filter your_dir -- -- all | |
This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. | |
Create a branch for changes. | |
git checkout -b repo1_branch |
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
org.h2.tools.Server.startWebServer(new JdbcConnection("jdbc:h2:mem:msp",new Properties())); |
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
--List all users who have been assigned a particular role | |
select * from dba_role_privs where granted_role = 'DBA' | |
--List all roles given to a user | |
select * from dba_role_privs where grantee = 'PHIL'; | |
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
@Test | |
public void document_from_my_company_are_visible_to_me() throws Exception { | |
Document document = new Document(DOC_ID).company(ORG_ID); | |
when(documentManagementService.findById(DOC_ID)).thenReturn(document); | |
when(userContext.getMyCompanyId()).thenReturn(ORG_ID); | |
boolean accessibleToMe = permissionService.isDocumentAccesibleToMe(DOC_ID); | |
assertThat(accessibleToMe).isTrue(); | |
} |
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
@Test | |
public void employee_on_full_month_sick_leave_gets_special_salary_type() throws Exception { | |
Calendar start = Calendar.getInstance(); | |
start.set(Calendar.YEAR, 2011); | |
start.set(Calendar.MONTH, DECEMBER - 1); // Januar = 0 | |
start.set(Calendar.DAY_OF_MONTH, 1); | |
Calendar end = Calendar.getInstance(); | |
start.set(Calendar.YEAR, 2011); | |
start.set(Calendar.MONTH, DECEMBER - 1); // Januar = 0 | |
start.set(Calendar.DAY_OF_MONTH, 31); |
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
//code before extracting method from part marked with <selection>: | |
float discount; | |
//some code | |
<selection> | |
discount = 0 ; | |
if (unitPricePerQuantity() >= 100) { | |
discount = unitPricePerQuantity() * 10 / 100; | |
} | |
</selection> |
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
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
- Pick up some open source project. Might be one that you are using
- Checkout issues list or request a new feature
- fix issues and implement features on hackathon
- easy to start - no need for bootstrapping environment and gathering specification before hackathon
- easy to have closure after one day of hackathon. One can pick issue of size that he can complete during one day.
- good feeling of contributing stg useful to tools that we use for free