Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Juan Herrera jdjuan

🎯
Focusing
Block or report user

Report or block jdjuan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jdjuan
jdjuan / google-calendars.md
Last active Jan 3, 2018
How to import/export public Google Calendars with one click
View google-calendars.md

Importing/Exporting public Google Calendars

It consist of 3 steps:

  1. Create a calendar
  2. Export a calendar
  3. Import a calendar

1. Create a Calendar

@jdjuan
jdjuan / angular.md
Created Jan 21, 2018
Angular Community Efforts
View angular.md

Community Impact: Juan Herrera

In Person Engagements: 1213

1. NgColombia (International Conference)

Latin America first Angular conference held in Medellín and gathering +230 attendees and 8 different speakers, including 3 GDEs:

View mousedrag-1.html
<!DOCTYPE html>
<html>
<head>
<title>Hello!</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://unpkg.com/@reactivex/rxjs/dist/global/Rx.js"></script>
</head>
<body>
View mousedrag-2.js
const { fromEvent } = Rx.Observable;
const move$ = fromEvent(document, 'mousemove');
const log = x => console.log(x);
move$.subscribe(log);
View mousedrag-3.js
import { paint } from './canvas.js';
const { fromEvent } = Rx.Observable;
const move$ = fromEvent(document, 'mousemove');
move$.subscribe(paint);
View mousedrag-4.js
import { paint } from './canvas.js';
const { fromEvent } = Rx.Observable;
const { skipUntil, takeUntil } = Rx.operators;
const move$ = fromEvent(document, 'mousemove');
const down$ = fromEvent(document, 'mousedown')
const up$ = fromEvent(document, 'mouseup')
const paints$ = move$.pipe(
skipUntil(down$),
View mousedrag-5.js
import { paint } from './canvas.js';
const { fromEvent } = Rx.Observable;
const { skipUntil, takeUntil, repeat } = Rx.operators;
const move$ = fromEvent(document, 'mousemove');
const down$ = fromEvent(document, 'mousedown')
const up$ = fromEvent(document, 'mouseup')
const paints$ = move$.pipe(
skipUntil(down$),
View mousedrag-6.js
import { paint } from './canvas.js';
const { fromEvent } = Rx.Observable;
const { takeUntil, mergeMap } = Rx.operators;
const move$ = fromEvent(document, 'mousemove')
const down$ = fromEvent(document, 'mousedown')
const up$ = fromEvent(document, 'mouseup')
const paints$ = down$.pipe(
mergeMap(down => move$)
View mousedrag-7.js
import { paint } from './canvas.js';
const { fromEvent } = Rx.Observable;
const { takeUntil, mergeMap } = Rx.operators;
const move$ = fromEvent(document, 'mousemove')
const down$ = fromEvent(document, 'mousedown')
const up$ = fromEvent(document, 'mouseup')
const paints$ = down$.pipe(
mergeMap(down => move$.pipe(takeUntil(up$)))
You can’t perform that action at this time.