Skip to content

Instantly share code, notes, and snippets.

View AdamSaleh's full-sized avatar

Adam Saleh AdamSaleh

View GitHub Profile
diff --git a/build.gradle b/build.gradle
index b698f81..fe25868 100644
--- a/build.gradle
+++ b/build.gradle
@@ -177,7 +177,7 @@ spacelift {
aerogearTestingTools {
product 'aerogear'
version { project.unifiedPushTestExtensionVersion }
- remoteUrl 'https://github.com/aerogear/aerogear-testing-tools/archive/master.zip'
+ remoteUrl 'https://github.com/aerogear/aerogear-testing-tools/archive/3ef47f6fd050240ba2bf
@AdamSaleh
AdamSaleh / Bug in message sender
Created January 16, 2015 15:27
Bug in message sender test
POST /ag-push/rest/sender/ HTTP/1.1
Authorization: Basic OTA2ZjA3ZTgtMzE5Yy00NzVmLWI2OWEtYWE5NTc2ODBkYWI1OjNhNDZmMTEzLWU5NjctNGUwZS1iNTZkLTI2MWFhNDllMjAxNw==
Content-Type: application/json
Accept: application/json
aerogear-sender: AeroGear Java Sender
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.7.0_67
Host: localhost:8080
Connection: keep-alive
@AdamSaleh
AdamSaleh / gist:3c588de0b62538b11187
Created January 14, 2015 13:07
Problem with 1.1.0 cartrige
2015/01/14 08:06:03,959 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ag-push].[org.jboss.aerogear.unifiedpush.rest.RestApplication]] (http--127.11.35.129-8080-4) Servlet.service() for servlet org.jboss.aerogear.unifiedpush.rest.RestApplication threw exception: org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540) [resteasy-jaxrs-2.3.2.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.jav
@AdamSaleh
AdamSaleh / gist:f562cb2edbbfed2b6f73
Created December 4, 2014 14:27
Faking ssl-cert for netty
cat myCA.serial
00cat myCA.conf
[ req ]
default_bits = 2048
distinguished_name = req_DN
string_mask = nombstr
[req_DN ]
countryName = "1. Country Name (2 letter code)"
countryName_default = CZ
11:16:50,580 INFO [stdout] (http-/127.0.0.1:8443-Acceptor-0) Allow unsafe renegotiation: false
11:16:50,580 INFO [stdout] (http-/127.0.0.1:8443-Acceptor-0) Allow legacy hello messages: true
11:16:50,580 INFO [stdout] (http-/127.0.0.1:8443-Acceptor-0) Is initial handshake: true
11:16:50,580 INFO [stdout] (http-/127.0.0.1:8443-Acceptor-0) Is secure renegotiation: false
11:16:50,581 INFO [stdout] (http-/127.0.0.1:8443-2) http-/127.0.0.1:8443-2, setSoTimeout(60000) called
11:16:50,581 INFO [stdout] (http-/127.0.0.1:8443-2) [Raw read]: length = 5
11:16:50,581 INFO [stdout] (http-/127.0.0.1:8443-2) 0000: 16 03 01 00 CE .....
11:16:50,581 INFO [stdout] (http-/127.0.0.1:8443-2) [Raw read]: length = 206
11:16:50,582 INFO [stdout] (http-/127.0.0.1:8443-2) 0000: 01 00 00 CA 03 01 32 F2 71 4C 02 C9 81 DC D4 BC ......2.qL......
11:16:50,582 INFO [stdout] (http-/127.0.0.1:8443-2) 0010: 3F 11 D6 61 40 51 0D 55 18 A6 61 1A 22 CD 4E 21 [email protected].".N!
12:18:50 PM - vchepeli: * Exception is:
12:18:50 PM - vchepeli: org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'jbossqe-mobile'.
12:18:50 PM - vchepeli: at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:54)
12:18:50 PM - vchepeli: at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:187) at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:39)
12:18:51 PM - vchepeli: at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
12:18:51 PM - vchepeli: at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.jav

SevenSegmentsApi

Implementation of json tracking api for 7segments.

Installation

It is a standard sln project. The SevenSegmentsApi subproject itself is a PCL library. There is an example console application showcasing some examples of usage.

After you clone/checkout the project, you should be able to link it to your project from your C# IDE of choice.

/*
public static List<Command> Import(String s){
List<Command> tmp = new List<Command> ();
char[] l = s.Split(new Char[]{'\v'});
}
public static String Export(List<Command> l){
List<String> output = new List<String> ();
foreach (var item in l) {
@AdamSaleh
AdamSaleh / gist:a00eab1a629f0c9663de
Created November 13, 2014 00:28
Work in progress
using System;
using System.Net;
using System.Runtime.Serialization.Json;
using System.Collections.Generic;
using System.Collections.Concurrent;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Linq;
using System.Threading;
def ips_to_test = {
enum IP {
v6, v4
}
def lo = [(IP.v6):"::1", (IP.v4):"127.0.0.1"]
def ip_envs = [
(IP.v4):["MYTESTIP_1","MYTESTIP_2"],
(IP.v6):["MYTESTIPV6_1","MYTESTIPV6_2"]];
def getIp = {IP v ->