Skip to content

Instantly share code, notes, and snippets.

View zaxy78's full-sized avatar

Aviad Sachs zaxy78

View GitHub Profile
@gautamsi
gautamsi / appointment.ts
Last active June 3, 2023 01:44
Fetch Appointments using ews-javascript-api
import { ExchangeService, ExchangeVersion, WebCredentials, 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 WebCredentials(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.
@erikschlegel
erikschlegel / azureElasticClusterSetup.md
Last active August 31, 2020 13:40
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
@evantoli
evantoli / GitConfigHttpProxy.md
Last active May 20, 2024 08:42
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@jpalala
jpalala / how-to-setup-mac-elasticsearch.md
Created September 11, 2015 08:28
setting up elasticsearch on your mac with brew

Install va homebrew

If you don't have homebrew installed - get homebrew here

Then run: brew install elasticsearch

Configuration

Update the elasticsearch configuration file in /usr/local/etc/elasticsearch/elasticsearch.yml.

@beradrian
beradrian / setproxy
Last active October 10, 2022 17:12
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 --global http.proxy %HTTP_PROXY%
git config --global https.proxy %HTTPS_PROXY%
# unset proxy
@squarism
squarism / elk_stack_install.md
Last active October 22, 2023 12:25
Quick Elasticsearch / Kibana / Logstash (ELK stack) Install (for your local mac dev box)

Elasticsearch / Kibana / Logstash Quick Install

Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰

Install Homebrew if not already. You probably have. If not, you should.

brew install elasticsearch nginx

do yourself a favor and get a better services command than launchctl

@brandonmwest
brandonmwest / example.cs
Last active January 16, 2024 15:52
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))));
@mprajwala
mprajwala / import_csv_to_mongo
Last active July 23, 2023 20:07
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)
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 21, 2024 05:35
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k