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 / 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)}')
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 / 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)
@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" />