Skip to content

Instantly share code, notes, and snippets.

View eskatos's full-sized avatar
⚒️
Crafting software

Paul Merlin eskatos

⚒️
Crafting software
View GitHub Profile
@eskatos
eskatos / Solarized Light for IntelliJ Darcula.icls
Last active October 16, 2019 16:31
Solarized Light for IntelliJ Darcula
<scheme name="Solarized Light for IntelliJ Darcula" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.0" />
<metaInfo>
<property name="created">2018-10-26T11:42:59</property>
<property name="ide">idea</property>
<property name="ideVersion">2018.3.0.0</property>
<property name="modified">2018-10-26T11:43:09</property>
<property name="originalScheme">Solarized Light for IntelliJ Darcula</property>
</metaInfo>
<option name="LINE_SPACING" value="1.2" />
@eskatos
eskatos / polygene.kt
Created April 24, 2017 06:07
Playing with Polygene & Kotlin
val application = Energy4Java().newApplication(
ApplicationAssembler { factory ->
factory.newApplicationAssembly("Application 1") {
mode = Application.Mode.development
version = "1"
setMetaInfo(Object())
val layer1 = layer("Layer 1") {
module("Module 1/A") {
values(Some::class) {
withTypes(Some::class)
value host_statistics_pages host_statistics_mb vm_stat_mb vm_stat_pages
free 10637 41 39 10178
inactive 1415946 5531 5533 1416664
wired 686800 2682 2682 686822
active 1424004 5562 5561 1423734
external 734911016 2870746 2302 589350
speculative 1 0 23 6022
total 4194304 16384 16384 4194304
available_fcache 734921652 2870787 2318 593506
available_inact 1426582 5572 5550 1420820
@eskatos
eskatos / osx-available-mem.sh
Last active January 13, 2017 10:02
osx available memory
#!/bin/bash
set -e
vmstat=$(vm_stat)
page_size=$(echo "$vmstat"|grep 'page size'|cut -d ' ' -f 8)
free_pages=$(echo "$vmstat"|awk '/^Pages free/ {print substr($3, 1, length($3)-1)}')
inactive_pages=$(echo "$vmstat"|awk '/^Pages inactive/ {print substr($3, 1, length($3)-1)}')
speculative_pages=$(echo "$vmstat"|awk '/^Pages speculative/ {print substr($3, 1, length($3)-1)}')
file_pages=$(echo "$vmstat"|awk '/^File-backed pages/ {print substr($3, 1, length($3)-1)}')
@eskatos
eskatos / Elasticsearch 2.x local embedded.java
Created November 11, 2016 11:05
Elasticsearch 2.x local embedded
Settings settings = Settings.settingsBuilder().
put( "path.work", new File( new File( fileConfig.temporaryDirectory(), identity.toString() ), "work" ).getAbsolutePath() ).
put( "path.home", new File( new File( fileConfig.temporaryDirectory(), identity.toString() ), "home" ).getAbsolutePath() ).
put( "path.logs", new File( fileConfig.logDirectory(), identity.toString() ).getAbsolutePath() ).
put( "path.data", new File( fileConfig.dataDirectory(), identity.toString() ).getAbsolutePath() ).
put( "path.conf", new File( fileConfig.configurationDirectory(), identity.toString() ).getAbsolutePath() ).
put( "http.enabled", false ).
put( "index.cache.type", "weak" ).
put( "index.number_of_shards", 1 ).
put( "index.number_of_replicas", 0 ).
@eskatos
eskatos / test.groovy
Last active December 3, 2015 14:29
Initialize @Unmanaged property on @Managed type
def "Initialize @Unmanaged property on @Managed type"() {
given:
buildFile << """
interface SomeThing {
void doSomething(String param)
}
class DefaultSomeThing implements SomeThing {
@Override
public void doSomething(String param) {
println param
@eskatos
eskatos / build.gradle
Created June 15, 2015 12:28
gradle gooffline
// Allow easy download of all dependencies to go offline
// ./gradlew gooffline
task gooffline {
doLast {
allprojects.configurations.flatten()*.resolvedConfiguration
}
}
@eskatos
eskatos / netbeans-messages.log
Created February 16, 2015 13:02
netbeans-gradle-project #25
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbeans.spi.java.classpath.ClassPathProvider
INFO [org.netbeans.gradle.project.ProjectLookupHack]: Using custom lookup for type org.netbea
@eskatos
eskatos / HelloWorld.java
Last active August 29, 2015 14:13
HelloQi4jWorld.java
@Mixins( { HelloWorld.Mixin.class } )
public interface HelloWorld
{
String say();
interface State
{
@NotEmpty Property<String> phrase();
@NotEmpty Property<String> name();
}
package qi4j;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collector;
import java.util.stream.Stream;
import org.junit.Test;