Skip to content

Instantly share code, notes, and snippets.

View zaxy78's full-sized avatar

Aviad Sachs zaxy78

View GitHub Profile
@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.
@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.
//
@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 / 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 / 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 / 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
^(.{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 / 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 / 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 / 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