Skip to content

Instantly share code, notes, and snippets.

View ayyash's full-sized avatar

Ayyash ayyash

View GitHub Profile
@ayyash
ayyash / transaction.component.html
Created October 13, 2017 11:31
Angular2 conditional subscription to route param
<my-transaction-form [transaction]="pageTransaction$ | async"></my-transaction-form>
@ayyash
ayyash / scroll.js
Created September 1, 2018 14:38
Scroll bookmarklet: bookmark that scrolls the current page slowly, helps in reading long articles without losing focus
javascript:(function()%7Bif(!window.areScrolling)%7Bwindow.areScrolling%3Dwindow.setInterval(function()%7Bwindow.scrollBy(0%2C1)%3B%7D%2C100)%3B%7Delse%7Bwindow.clearInterval(window.areScrolling)%3Bwindow.areScrolling%3Dnull%3B%7D%7D)()
@ayyash
ayyash / gulpfilee.js
Created January 28, 2019 12:16
Extract material icons svg files from repo
// create a simple task to take out svg from production and save it elsewhere
const gulp = require('gulp');
var rename = require('gulp-rename');
var path = require('path');
exports.extract = function(){
// from **/svg/production to /
return gulp.src('./**/svg/production/*24px.svg', {base: '.'})
.pipe(rename(function(file) {
file.dirname = '../output/' + file.dirname.split(path.sep)[0];
@ayyash
ayyash / angular.json
Last active March 13, 2019 14:09
Angular Universal Internationalization
{
"$schema": "./node_modules/@angular-devkit/core/src/workspace/workspace-schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"projweb": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "jr",

Keybase proof

I hereby claim:

  • I am ayyash on github.
  • I am ayyash (https://keybase.io/ayyash) on keybase.
  • I have a public key ASB222Q-DYxTyDYW6UKnD79RjNCMY8mvd4i3zjPju2tO8Ao

To claim this, I am signing this object:

source product - search product - details homepage - campaign Totals
Event name Event count Event count Event count Event Count
Totals xxxx xxxx xxxx xxxx
gr_reveal xxxx xxxx xxxx xxxx
Event Trigger Parameters
page_view (web) each time the page loads or the browser history state is changed by the active site. Collected by default via enhanced measurement. page_location (page URL), page_referrer (previous page URL), engagement_time_msec. In addition to the default language, page_location, page_referrer, page_title, screen_resolution
source product - details homepage - navigation Totals
action click drag click
Event name Event count Event count Event count Event Count
Totals xxxx xxxx xxxx xxxx
gr_upload xxxx xxxx xxxx xxxx
// GTM service
declare let dataLayer: any[]; // Declare google tagexport enum EnumGtmSource {
// any source in web is added here
// left side is internal, right side is GTM
ProductsList = 'products list',
ProductsRelatedList = 'products related',
ProjectsList = 'projects list',
// ...etc
}
export enum EnumGtmEvent {
@ayyash
ayyash / index.ts
Last active September 30, 2022 12:09
Skimmed down version of nguniversal prerender builder
import {
BuilderContext,
BuilderOutput,
createBuilder,
targetFromTargetString,
} from '@angular-devkit/architect';
// import { BrowserBuilderOptions } from '@angular-devkit/build-angular';
// import { normalizeOptimization } from '@angular-devkit/build-angular/src/utils/normalize-optimization';
// import { augmentAppWithServiceWorker } from '@angular-devkit/build-angular/src/utils/service-worker';
import * as fs from 'fs';