Skip to content

Instantly share code, notes, and snippets.

View hozefam's full-sized avatar
🏠
Working from home

Hozefa Mangalorewala hozefam

🏠
Working from home
View GitHub Profile
@hozefam
hozefam / Program.cs
Last active February 3, 2024 05:57
AI Document Intelligence
using Azure;
using Azure.AI.FormRecognizer.DocumentAnalysis;
string endpoint = "<endpoint>";
string key = "<access-key>";
AzureKeyCredential cred = new AzureKeyCredential(key);
DocumentAnalysisClient client = new DocumentAnalysisClient(new Uri(endpoint), cred);
//sample form document
Uri fileUri = new Uri ("<url-of-document-to-analyze>");
@hozefam
hozefam / fromEvent.js
Created April 2, 2021 19:55
fromEvent - RxJS
import events from 'events';
const eventEmitter = new events.EventEmitter();
eventEmitter.on('click', () => {});
fromEvent(eventEmitter, 'click').subscribe((x) => log('click event called'));
eventEmitter.emit('click');
@hozefam
hozefam / delay.js
Last active April 2, 2021 19:15
Simulate delay in Javascript / Node using Promise
const dbConnected = true;
const longRunningTask = (ms = 5000) => {
return new Promise((resolve, reject) => {
setTimeout(dbConnected ? resolve : reject, ms);
});
};
@hozefam
hozefam / .zshrc
Created March 5, 2021 14:20 — forked from karlhadwen/.zshrc
.zshrc settings
export ZSH="/Users/karlhadwen/.oh-my-zsh"
export PATH=${PATH}:/usr/local/mysql/bin/
ZSH_THEME="robbyrussell"
ZSH_DISABLE_COMPFIX=true
plugins=(
git
osx
zsh-autosuggestions
@hozefam
hozefam / myscript.sh
Created March 21, 2020 16:10 — forked from bradtraversy/myscript.sh
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@hozefam
hozefam / ssh.md
Created March 21, 2020 15:09 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test