Skip to content

Instantly share code, notes, and snippets.

View chaman-k's full-sized avatar
🏠
Working from home

Chaman chaman-k

🏠
Working from home
  • India
View GitHub Profile
@chaman-k
chaman-k / rxjs-diagrams.md
Created June 25, 2019 14:57 — forked from PCreations/rxjs-diagrams.md
Super Intuitive Interactive Diagrams to learn combining RxJS sequences by Max NgWizard K
@chaman-k
chaman-k / app.component.ts
Created March 3, 2019 09:10
Compress images in Angular recursively using rxJS
import { Component } from '@angular/core';
import { map, expand } from 'rxjs/operators';
import { EMPTY } from 'rxjs';
import { CompressorService } from './compressor.service';
@Component({
selector: 'app-root',
template: '<input type="file" (change)="process($event)" multiple/>',
styles: ['']
})
//Filename: upload.component.ts
import { Component, OnInit } from '@angular/core';
import { UploadService } from '../upload.service';
import { map, expand } from 'rxjs/operators';
import { EMPTY } from 'rxjs';
export class uploadFiles {
constructor(public video: File, public path: string, public uploadURI: string) {
this.video = video;
this.path = path;
@chaman-k
chaman-k / compress.js
Last active June 2, 2020 20:08
Compress, resize images in javascript
/*
<!-- HTML Part -->
<input id="file" type="file" accept="image/*">
<script>
document.getElementById("file").addEventListener("change", function (event) {
compress(event);
});
</script>
*/