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 json | |
class Income: | |
def __init__(self): | |
self.income_sources = {} | |
def add(self, source, amount): | |
"""Add income to the total, categorizing by source.""" | |
self.income_sources[source] = self.income_sources.get(source, 0) + amount |
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
https://github.com/ripienaar/free-for-dev | |
https://github.com/akullpp/awesome-java |
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
package cz.tejnora.pokusy; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.hamcrest.MatcherAssert.assertThat; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.concurrent.atomic.AtomicInteger; |
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
package com.budhash.common.utils; | |
//import com.github.drapostolos.typeparser.TypeParser; | |
import org.apache.commons.lang3.StringUtils; | |
import java.util.*; | |
import java.util.function.Function; | |
import java.util.stream.Collectors; | |
public class Converter { |
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
package com.budhash.common.location; | |
import com.budhash.common.utils.Converter; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |
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
#!/bin/bash | |
set -e | |
UPDATES_URL="http://updates.jenkins-ci.org/download/plugins/" | |
if [ $# -lt 2 ]; then | |
echo "USAGE: $0 plugin-list-file destination-directory" | |
exit 1 | |
fi |
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
http://www.theotherian.com/2013/11/non-blocking-cache-with-guava-and-listenable-futures.html |
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
/* | |
* Copyright (c) 2012 Jan Kotek | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 trust manager that does not validate certificate chains | |
TrustManager[] trustAllCerts = new TrustManager[] { | |
new X509TrustManager() { | |
public java.security.cert.X509Certificate[] getAcceptedIssuers() { | |
return null; | |
} | |
public void checkClientTrusted( | |
java.security.cert.X509Certificate[] certs, String authType) { | |
} | |
public void checkServerTrusted( |
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
-server | |
-Xms1g | |
-Xmx3g | |
-Xss16m | |
-XX:MaxPermSize=350m | |
-XX:+UseConcMarkSweepGC | |
-XX:+CMSParallelRemarkEnabled | |
-XX:ConcGCThreads=4 | |
-XX:ReservedCodeCacheSize=225m | |
-XX:+AlwaysPreTouch |
NewerOlder