Skip to content

Instantly share code, notes, and snippets.

View zaxy78's full-sized avatar

Aviad Sachs zaxy78

View GitHub Profile
@zaxy78
zaxy78 / azureElasticClusterSetup.md
Created June 10, 2019 22:04 — forked from erikschlegel/azureElasticClusterSetup.md
Setup an Elasticsearch Cluster on Azure

##Deploying an Elastic Cluster on Azure This document assumes you already have an azure subscription. We'll use a pre-configured azure resource manager template built by the Elastic team to simplify the deployment of an Elastic cluster on Azure. By using this template, you can specify the number of data / master nodes, install commercial cluster oversight and monitoring products such as Marvel for cluster / index monitoring, Kibana for data analytics and insight, Shield for authentication and Sense for an intuitive light weight data querying tool.

We'll be using a Bring-Your-Own-License (BYOL) solution template. Elasticsearch and Kibana are both open source and free of use. Marvel basic monitoring is covered under the free basic subscription, which you can sign up for here. ###Lets get started

  • Use the Elastic and Kibana ARM template here to get started. This template will also create and automou
@zaxy78
zaxy78 / iterm2-solarized.md
Created February 8, 2019 08:46 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

@zaxy78
zaxy78 / System Design.md
Created September 25, 2018 21:49 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@zaxy78
zaxy78 / example.cs
Created June 2, 2018 21:05 — forked from brandonmwest/example.cs
Generating base64-encoded Authorization headers in a variety of languages
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", username, password))));
^(.{17})\s+SN\=(\S+)\s+SPO2\=(\S+)\%\s+BPM\=(\S+)\s+PI\=(\S+)\%\s+SPCO\=(\S+)\%\s+SPMET\=(\S+)\%\s+DESAT\=(\S+)\s+PIDELTA\=(\S+)\s+PVI\=(\S+)\s+ALARM\=(\S+)\s+EXC\=\S+\s*$
firePulseOximeter
lastPoint
MM/dd/yy HH:mm:ss
guid
spo2 filter
heartRate filter
perfusionIndex filter
spco filter
spmet filter
@zaxy78
zaxy78 / setproxy
Last active May 9, 2018 08:34 — forked from beradrian/setproxy
Set proxy for npm and git
# set a proxy
set HTTP_PROXY=
set HTTPS_PROXY=%HTTP_PROXY%
npm config set proxy %HTTP_PROXY%
npm config set https.proxy %HTTPS_PROXY%
npm config set https-proxy %HTTPS_PROXY%
git config set --global http.proxy %HTTP_PROXY%
git config set --global https.proxy %HTTPS_PROXY%
# unset proxy
@zaxy78
zaxy78 / safari-webrtc-stats.json
Created March 20, 2018 14:56
WebRTC PeerConnection getStats() objects for Safari 11
// 1 Remote Peer answer with a Video Stream (no audio)
{
"collection_of_stats": [
{
"map": [
{
"id": "RTCCertificate_08:B0:75:55:2------------------------------------------------------------",
"timestamp": 1521550605561,
"type": "certificate",
@zaxy78
zaxy78 / import_csv_to_mongo
Created March 16, 2018 12:20 — forked from mprajwala/import_csv_to_mongo
Store CSV data into mongodb using python pandas
#!/usr/bin/env python
import sys
import pandas as pd
import pymongo
import json
def import_content(filepath):
mng_client = pymongo.MongoClient('localhost', 27017)
@zaxy78
zaxy78 / .zshrc
Created March 6, 2018 10:19 — forked from zanshin/.zshrc
My .zshrc file
# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#export ZSH_THEME="robbyrussell"
export ZSH_THEME="zanshin"
@zaxy78
zaxy78 / WebRTCinWKWebViewiOS11.swift
Last active May 2, 2020 12:21
Displaying WebRTC PeerConnection sample in a iOS WKWebView
//
// ViewController.swift
// WKWebView with adapter.js Sample
//
// To use this file, simply create a new empty 'Single View App'
// in Xcode, and replace ViewController.swift content to this.
//
// Created by Sachs, Aviad on 5/3/18
// Copyright © 2017 Sachs, Aviad. All rights reserved.
//