This file contains hidden or 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 optivo.core.spring.SpringHelper; | |
| import org.apache.hadoop.hbase.Cell; | |
| import org.apache.hadoop.hbase.CellUtil; | |
| import org.apache.hadoop.hbase.TableName; | |
| import org.apache.hadoop.hbase.client.Connection; | |
| import org.apache.hadoop.hbase.client.Scan; | |
| import org.apache.hadoop.hbase.client.Table; | |
| import org.apache.hadoop.hbase.util.Bytes; | |
| import java.nio.ByteBuffer; |
This file contains hidden or 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 abstract sealed class Action permits WriteOdif, CopyOcif, CopyOip, CopyResource, CopyJsps { | |
| } | |
| public final class WriteOdif extends Action { ... } | |
| public final class CopyOcif extends Action { ... } | |
| public final class CopyOip extends Action { ... } | |
| public final class CopyResource extends Action { ... } |
This file contains hidden or 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
| git-push-current() { | |
| local branch_name="$(git branch --show-current)" | |
| echo "---------------------------------------------" | |
| echo "Pushing changes from '$branch_name' to origin" | |
| echo "---------------------------------------------" | |
| git push -u origin "$branch_name" | |
| } |
This file contains hidden or 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
| # | |
| # .git/hooks/post-receive | |
| # | |
| #!/bin/bash | |
| while read oldrev newrev ref | |
| do | |
| # only checking out the master (or whatever branch you would like to deploy) | |
| if [[ $ref =~ .*/master$ ]]; | |
| then |
This file contains hidden or 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
| :set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<,space:. |
This file contains hidden or 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
| @GrabResolver(name = "OJO", root = "https://oss.jfrog.org/artifactory/repo") | |
| @GrabConfig(systemClassLoader = true) | |
| @Grab("io.ratpack:ratpack-groovy:1.3.3") | |
| @Grab("io.prometheus:simpleclient:0.0.21") | |
| @Grab(group='io.prometheus', module='simpleclient_common', version='0.0.21') | |
| @Grab(group = 'ch.qos.logback', module = 'logback-classic', version = '1.0.13') | |
| import static ratpack.groovy.Groovy.ratpack | |
| import io.prometheus.client.* | |
| import io.prometheus.client.exporter.common.TextFormat |
This file contains hidden or 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
| #### | |
| # tested on Ubuntu | |
| #### | |
| # add 2min delay on eth0 | |
| sudo tc qdisc add dev eth0 root netem delay 120000ms | |
| # remove delay | |
| sudo tc qdisc del dev eth0 root netem |
This file contains hidden or 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
| assertEquals('7711628332802', FashionIdUtils.calculateEan('162833280')) | |
| assertEquals('7711000000008', FashionIdUtils.calculateEan('100000000')) | |
| assertEquals('7719999999990', FashionIdUtils.calculateEan('999999999')) | |
| assertEquals('7715000000006', FashionIdUtils.calculateEan('500000000')) | |
| assertEquals('7711234567896', FashionIdUtils.calculateEan('123456789')) | |
| assertEquals('7719876543216', FashionIdUtils.calculateEan('987654321')) |
This file contains hidden or 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
| @EqualsAndHashCode | |
| class Location { | |
| public final int x | |
| public final int y | |
| } | |
This file contains hidden or 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
| @Grab( 'com.netflix.rxjava:rxjava-groovy:0.15.1' ) | |
| import groovy.transform.* | |
| import rx.* | |
| @CompileStatic | |
| class RPSRX { | |
| enum Result { | |
| WIN, LOSE, DRAW | |
| } | |
NewerOlder