Skip to content

Instantly share code, notes, and snippets.

View omerlh's full-sized avatar

Omer Levi Hevroni omerlh

View GitHub Profile
@omerlh
omerlh / Option 1
Created May 21, 2015 12:09
Device Group
HomeDeviceEntity
{
DeviceId: A
GroupId: G
}
HomeDeviceEntity
{
DeviceId: B
GroupId: G
}
HomeDeviceEntity
{
DeviceId: A
}
HomeDeviceEntity
{
DeviceId: B
}
DeviceGroupEntity
{
@omerlh
omerlh / gist.js
Created August 10, 2015 06:11
pass bunyan log instance
var options = {
log: log
};
var bearerStategy = new BearerStrategy(options,
function(token, done) {
return done(null, token);
});
passport.use(bearerStategy);
//
// MockURLProtocol.swift
// SolutoHome
//
// Created by Omer Levi Hevroni on 2/23/16.
// Copyright © 2016 Soluto. All rights reserved.
//
import Foundation
import com.datatheorem.android.trustkit.TrustKit;
import com.datatheorem.android.trustkit.config.PublicKeyPin;
import javax.inject.Inject;
import okhttp3.CertificatePinner;
import okhttp3.OkHttpClient;
public class OkHttpCertPin {
private final TrustKit mTrustKit;
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ZAP Scanning Report</title>
</head>
<body text="#000000">
<p>
<strong>ZAP Scanning Report</strong>
</p>
<p>
2017-08-09T11:38:28.148459764Z Found Java version 1.8.0_111-internal
2017-08-09T11:38:28.177835375Z Available memory: 1999 MB
2017-08-09T11:38:28.185716651Z Setting jvm heap size: -Xmx499m
2017-08-09T11:38:44.816523011Z 5722 [main] INFO org.zaproxy.zap.DaemonBootstrap - OWASP ZAP 2.6.0 started 09/08/17 11:38:44
2017-08-09T11:38:45.788296197Z 6607 [main] INFO org.parosproxy.paros.common.AbstractParam - Setting config api.disablekey = true was null
2017-08-09T11:38:45.788336152Z 6607 [main] INFO org.parosproxy.paros.common.AbstractParam - Setting config database.recoverylog = false was null
2017-08-09T11:38:45.788348439Z 6608 [main] INFO org.parosproxy.paros.common.AbstractParam - Setting config connection.timeoutInSecs = 120 was null
2017-08-09T11:38:45.788358427Z 6608 [main] INFO org.parosproxy.paros.common.AbstractParam - Setting config api.addrs.addr.name = .* was null
2017-08-09T11:38:45.788366618Z 6608 [main] INFO org.parosproxy.paros.common.AbstractParam - Setting config api.addrs.addr.regex = true
@omerlh
omerlh / install_ruby.sh
Created October 26, 2017 07:36
Use this script in Dockerfile to install specific ruby version
#!/bin/bash
# Source: oficial ruby docker image
set -ex
mkdir -p /usr/local/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /usr/local/etc/gemrc
@omerlh
omerlh / secret.yaml.erb
Created December 21, 2017 14:49
Generating ACS autoscaler secrets.yaml
apiVersion: v1
kind: Secret
metadata:
name: autoscaler
data:
azure-sp-app-id: <%= @app_id %>
azure-sp-secret: <%= @app_secret %>
azure-sp-tenant-id: <Replace wiht your Tenant Id base64 encoded>
kubeconfig-private-key: <%= @kubeconfig_private_key %>
client-private-key: <%= @client_private_key %>
2018-01-24T19:31:16.711670649Z Function started (Id=7607ee73-9b89-4e49-b62c-203d5a3cd6cc)
2018-01-24T19:31:16.992934384Z Executing 'Functions.GitHubWebhookHandler' (Reason='This function was programmatically called via the host APIs.', Id=7607ee73-9b89-4e49-b62c-203d5a3cd6cc)
2018-01-24T19:31:17.326583193Z fail: Host.Executor[0]
2018-01-24T19:31:17.326695697Z => RequestId:0HLB3C2ACNOII:00000001 RequestPath:/api/GitHubWebhookHandler => System.Collections.Generic.Dictionary`2[System.String,System.Object] => System.Collections.Generic.Dictionary`2[System.String,System.Object]
2018-01-24T19:31:17.326797601Z Exception while executing function: Functions.GitHubWebhookHandler. System.Private.CoreLib: One or more errors occurred. (Worker process with pid 35 exited with code 1) (Worker process with pid 55 exited with code 1) (Worker process with pid 68 exited with code 1). Worker process with pid 35 exited with code 1.
2018-01-24T19:31:17.348149447Z Exception while executing