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
class abstract Geometry { | |
abstract Geometry envelope(); | |
} | |
clas Rect extends Geometry { | |
public Rect(int height, int width) {...} | |
} | |
class Circle extends Geometry { | |
public Geometry envelope() { |
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/sh | |
#Usage copy_twbs_scaffold scaffoleding_git_cloned destination_prj | |
echo "Coping twitterbootstrap scaffold files \n from: $1 \n to: $2" | |
mkdir -p $2/src/templates/scaffolding | |
cp $1/src/templates/scaffolding/* $2/src/templates/scaffolding; | |
cp $1/web-app/css/scaffolding.css $2/web-app/css/ | |
echo "WARN overwriting of your existent conf iguration, please re-check it!!" | |
cp -Rf $1/grails-app/conf $2/grails-app/ |
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
@RunWith(Suite.class) | |
@Suite.SuiteClasses({ | |
org.logstash.AccessorsTest, | |
org.logstash.ackedqueue.CheckpointTest, | |
org.logstash.ackedqueue.HeadPageTest, | |
org.logstash.ackedqueue.io.FileCheckpointIOTest, | |
org.logstash.ackedqueue.io.FileMmapIOTest, | |
org.logstash.ackedqueue.io.IntVectorTest, | |
org.logstash.ackedqueue.io.LongVectorTest, | |
org.logstash.ackedqueue.io.MmapPageIOTest, |
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
import org.eclipse.jetty.toolchain.perf.PlatformTimer; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.junit.rules.TemporaryFolder; | |
import java.io.IOException; | |
import java.util.concurrent.*; |
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
#!/usr/bin/env ruby | |
require 'socket' | |
host = "localhost" | |
port = 5043 | |
PAYLOAD = "System.Runtime.InteropServices.COMException (0x80004005): Error recived. at UiPath.UiNodeClass.Get(String bstrAttr) at UiPath.Core.UiElement.IsElementReady()\r" | |
def request_close(host, port) | |
client = TCPSocket.open(host, port) |
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
#!/usr/bin/env ruby | |
class CheckpointDecoder | |
attr_reader :path | |
def initialize(path) | |
@path = path | |
end | |
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
#run dockerized RabbitMQ | |
# docker run -v rabbitmq-data:/var/lib/rabbitmq --hostname my-rabbit --name rabbit_dev -p 15672:15672 -p 5672:5672 rabbitmq:3-management | |
# navigate to http://localhost:15672/#/queues | |
# login guest:guest | |
require 'march_hare' | |
conn = MarchHare.connect(:host => "localhost") | |
ch = conn.create_channel | |
exchange = ch.direct("sysmsg", :durable => true) |
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
> Task :installDefaultGems FAILED | |
#<Class:0x71bf592a>: Command failed with status (1): [./gradlew assemble...] | |
create_shell_runner at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/file_utils.rb:67 | |
sh at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/file_utils.rb:57 | |
<main> at C:/Users/andrea/workspace/logstash/rakelib/compile.rake:34 | |
execute at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273 | |
each at org/jruby/RubyArray.java:1820 | |
execute at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:273 | |
invoke_with_call_chain at C:/Users/andrea/workspace/logstash/vendor/bundle/jruby/2.5.0/gems/rake-12.3.3/lib/rake/task.rb:214 | |
mon_synchronize at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:237 |
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
# input sample: {"name": "John", "outer": {"inner": {"leaf_1": "a leaf 1", "leaf_2": "a leaf 2", "leaf_3": "a leaf 3"}}} | |
input { | |
stdin { | |
codec => json | |
} | |
} | |
filter { | |
ruby { |
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
FROM adoptopenjdk/openjdk16:x86_64-alpine-jdk-16.0.1_9 | |
WORKDIR /root | |
RUN adduser --disabled-password --gecos "" --home /home/logstash logstash && \ | |
mkdir -p /usr/local/share/ruby-build && \ | |
mkdir -p /opt/logstash && \ | |
mkdir -p /opt/logstash/data && \ | |
mkdir -p /mnt/host && \ | |
chown logstash:logstash /opt/logstash |
OlderNewer