Skip to content

Instantly share code, notes, and snippets.

View ayyash's full-sized avatar

Ayyash ayyash

View GitHub Profile
@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",
@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 / 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 / transaction.component.html
Created October 13, 2017 11:31
Angular2 conditional subscription to route param
<my-transaction-form [transaction]="pageTransaction$ | async"></my-transaction-form>