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))));
@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 / 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 / appointment.ts
Created October 1, 2017 14:04 — forked from gautamsi/appointment.ts
Fetch Appointments using ews-javascript-api
import { ExchangeService, ExchangeVersion, ExchangeCredentials, Uri, DateTime, CalendarView, WellKnownFolderName, EwsLogging } from "ews-javascript-api";
import credentials = require("./credentials"); //for username and password
EwsLogging.DebugLogEnabled = false;
var service = new ExchangeService(ExchangeVersion.Exchange2010);
service.Credentials = new ExchangeCredentials(credentials.userName, credentials.password);
service.Url = new Uri("https://outlook.office365.com/Ews/Exchange.asmx");
var view = new CalendarView(DateTime.Now.Add(-1, "week"), DateTime.Now); // appointments in last one week.