Skip to content

Instantly share code, notes, and snippets.

Index: projects/ngx-ui-tour-core/src/lib/tour.service.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/projects/ngx-ui-tour-core/src/lib/tour.service.ts b/projects/ngx-ui-tour-core/src/lib/tour.service.ts
--- a/projects/ngx-ui-tour-core/src/lib/tour.service.ts (revision 3663385f0b48a83f5cc31d00b5a8c004b4c99930)
+++ b/projects/ngx-ui-tour-core/src/lib/tour.service.ts (date 1655284843998)
@@ -4,7 +4,7 @@
import type {UrlSegment} from '@angular/router';
@hakimio
hakimio / robin_nano_cfg.txt
Created February 12, 2021 21:47
BLTouch config for Creativity Elf
#============================= Z轴探针设置 =============================
#探针接口Z-Min或Z-Max.
>Z_MIN_PROBE_PIN_MODE 2 # 0:不使用; 1:接Z_MIN; 2:接ZMAX
>Z_PROBE_OFFSET_FROM_EXTRUDER 0 # Z 偏移: -below +above [the nozzle]
>X_PROBE_OFFSET_FROM_EXTRUDER 0 # X 偏移: -left +right [of the nozzle]
>Y_PROBE_OFFSET_FROM_EXTRUDER -20 # Y 偏移: -front +behind [the nozzle]
>XY_PROBE_SPEED 6000 # 探针XY轴移动速度 (mm/m)
>Z_PROBE_SPEED_FAST 6000 # Speed for the first approach when double-probing (with PROBE_DOUBLE_TOUCH)
>Z_PROBE_SPEED_SLOW 600 # Speed for the "accurate" probe of each point
@hakimio
hakimio / fast-cold-start-firestore-firebase-function.ts
Last active December 8, 2020 09:14
Improve Firebase and Google Cloud function cold starts by using Firestore REST client instead of the default gRPC (time to retrieve a single document down from ~1.5 s to ~250 ms in cold start function)
import {firestore_v1, google} from 'googleapis';
import {convert} from 'firestore-adapter';
let fs: firestore_v1.Firestore;
const getFirestore = async (): Promise<firestore_v1.Firestore> => {
if (!fs) {
const auth = new google.auth.GoogleAuth({
scopes: ['https://www.googleapis.com/auth/cloud-platform']
}),
@hakimio
hakimio / base-store.service.ts
Last active October 19, 2020 12:34
DevExtreme usage with Akita state management
import {EntityState, getEntityType, getIDType} from '@datorama/akita';
import {HttpMethod, NgEntityService} from '@datorama/akita-ng-entity-service';
import {HttpGetConfig} from '@datorama/akita-ng-entity-service/lib/types';
import {Observable, throwError} from 'rxjs';
import {DxLoadOptions} from '../query-builder/query-builder.model';
import {QueryBuilder} from '../query-builder/query-builder.service';
import {HttpErrorResponse} from '@angular/common/http';
import {HttpGetResponse, LoadResult} from './base-store.model';
import {map, tap} from 'rxjs/operators';
import {DxStoreChange, DxStoreChangeType} from '../dx-store-manager/dx-store-manager.model';
@hakimio
hakimio / google-auth.model.ts
Last active June 26, 2020 07:05
AWS Cognito Google authentication service
export interface AuthenticationTokens {
id_token: string;
access_token: string;
refresh_token: string;
expires_in: number;
token_type: string;
}
import {Component, OnDestroy, OnInit} from '@angular/core';
import {NestStoreService} from '../../services/store';
import DataSource from 'devextreme/data/data_source';
@Component({
selector: 'my-customers',
templateUrl: './customers.component.html'
})
export class CustomersComponent implements OnInit, OnDestroy {
@hakimio
hakimio / app.component.css
Created November 20, 2019 14:24
DevExtreme dynamic form updates
::ng-deep .first-group,
::ng-deep .second-group {
padding: 20px;
}
::ng-deep .second-group {
background-color: rgba(191, 191, 191, 0.15);
}
::ng-deep .form-avatar {
diff --git a/node_modules/serverless/bin/serverless.js b/node_modules/serverless/bin/serverless.js
index 82bc47a..77d4a01 100644
--- a/node_modules/serverless/bin/serverless.js
+++ b/node_modules/serverless/bin/serverless.js
@@ -2,6 +2,13 @@
'use strict';
+// global graceful-fs patch
+// https://github.com/isaacs/node-graceful-fs#global-patching