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 pl.lamvak.utils; | |
public class CompositingRepository<K, L, V> implements Repository<K, V> { | |
private Repository<K, L> first; | |
private Repository<L, V> second; | |
public CompositingRepository(Repository<K, L> first, Repository<L, V> second) { | |
this.first = first; | |
this.second = second; | |
} |
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 pl.lamvak.examples; | |
import com.google.common.collect.ImmutableList; | |
import org.junit.Test; | |
import java.util.ArrayList; | |
import java.util.Comparator; | |
import java.util.LinkedList; | |
import java.util.List; |
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
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for org.jbake:jbake-core:jar:2.5.0 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 111, column 21 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 122, column 18 | |
[WARNING] | |
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. | |
[WARNING] | |
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. | |
[WARNING] |
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
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for org.jbake:jbake-core:jar:2.5.0 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 122, column 18 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 111, column 21 | |
[WARNING] | |
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. | |
[WARNING] | |
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. | |
[WARNING] |
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
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for org.jbake:jbake-core:jar:2.5.0 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 111, column 21 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 122, column 18 | |
[WARNING] | |
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. | |
[WARNING] | |
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. | |
[WARNING] |
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
[INFO] Scanning for projects... | |
[WARNING] | |
[WARNING] Some problems were encountered while building the effective model for org.jbake:jbake-core:jar:2.5.0 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 111, column 21 | |
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ line 122, column 18 | |
[WARNING] | |
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. | |
[WARNING] | |
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects. | |
[WARNING] |
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 | |
while true; | |
do | |
sleep 30s; | |
ping -c 1 8.8.8.8 > /dev/null 2>&1; | |
if [[ $? != 0 ]]; | |
then | |
echo "connection dropped; reconnecting now"; | |
date; | |
killall -HUP modem-manager && sleep 30s && nmcli con up uuid <<PLACE your aero2 connection uuid here>> && sleep 120s; |
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
^[.0-9]+ - [^ ]+ \[[^]]+\] "(HEAD|GET|POST) ([^"/][^"]*|/([^"w][^"]*|w([^"p][^"]*|(p([^"-][^"]*|(-([^"al][^"]*|(l([^"o][^"]*|(o([^"g][^"]*|(g([^"i][^"]*|(i([^"n][^"]*|(n([^".][^"]*|(\.([^"p][^"]*|(p([^"h][^"]*|(h([^"p][^"]*|(p[^ "?]+)))))))))))))))))|(a([^"d][^"]*|(d([^"m][^"]*|(m([^"i][^"]*|(i([^"n][^"]*|(n([^"/][^"]*)))))))))))))))))HTTP/[.0-9]+" (200|206|301|304) [0-9]+ "[^"]*" "[^"]*" "[^"]*"$ |
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
module Main where | |
import System.IO.MMap | |
import qualified Data.ByteString.Lazy as BL | |
somedata:: IO BL.ByteString | |
somedata = mmapFileByteStringLazy "some.data" Nothing | |
main = somedata >>= return . show . BL.last >>= putStrLn | |
{- some.data file is 1625424 bytes long (in case that matters) |
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
func MakeDict(prefix string, strings []string) (dict *Dict, err error) { | |
image_file_size := 0 | |
dict, err = nil, nil | |
for _, s := range strings { | |
// accomodate the string itself, length counter and zero-byte marker | |
// for the reason of backwards debility | |
image_file_size += len(s) + 5 | |
} | |
image_file, err := os.Create(prefix + `.image`) | |
defer image_file.Close() |