Table of Contents
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
### Keybase proof | |
I hereby claim: | |
* I am alexsnaps on github. | |
* I am alexsnaps (https://keybase.io/alexsnaps) on keybase. | |
* I have a public key whose fingerprint is 27B8 94D1 A81E C2D0 019F 3845 E616 FB14 12C4 F75B | |
To claim this, I am signing this object: |
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
#include <iostream> | |
#include <msgpack.hpp> | |
#include <unistd.h> | |
static const std::size_t MSGPACK_CHUNK_SIZE = 8 * 1024; // 64KB works fine! | |
void assert_key_exists(const msgpack::object &object, const char string[6]); | |
bool equal_to_symbol_p(const msgpack::object &object, const std::string &string); | |
void dump_map(const msgpack::object &object); |
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
<config | |
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' | |
xmlns='http://www.ehcache.org/v3' | |
xmlns:jsr107='http://www.ehcache.org/v3/jsr107'> | |
<service> | |
<jsr107:defaults default-template="tinyCache"> | |
<jsr107:cache name="users" template="usersTemplate"/> | |
</jsr107:defaults> | |
</service> |
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
<ehcache:config | |
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' | |
xmlns:ehcache='http://www.ehcache.org/v3'> | |
<ehcache:cache-template name="example"> | |
<ehcache:key-type>java.lang.String</ehcache:key-type> | |
<ehcache:value-type>java.lang.String</ehcache:value-type> | |
<ehcache:capacity>120</ehcache:capacity> | |
</ehcache:cache-template> |
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
public class Address { | |
private final int id; | |
public Set<Employee> employees = new HashSet<Employee>(); | |
public Address(final int id) { | |
this.id = id; | |
} |
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 testStoreSPI() { | |
SPITester tester = new StoreTester(new Factory<OnHeapStore>()) | |
.runTestSuite() | |
.throwJUnitException(); | |
} |
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
// I probably should have this code in its own method, to explain the intent with a proper method name... | |
while (true) { | |
try { | |
Thread.currentThread().join(); | |
} catch (InterruptedException f) { | |
//ignore | |
} | |
} | |
// I also first thought I was on crack when I wrote these lines... Yet, as it turns out, this code is correct! |
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
scheduler.scheduleJob( | |
localTrigger( | |
newTrigger() | |
.forJob("importantJob")) | |
.where(node() | |
.has(atLeastAvailable(512, MemoryConstraint.Unit.MB) | |
.is(OsConstraint.LINUX))) | |
.build()); |