Skip to content

Instantly share code, notes, and snippets.


Vikram Vasudevan VikramVasudevan

View GitHub Profile
View mouse-wheel.directive.ts
import { Directive, Output, HostListener, EventEmitter } from '@angular/core';
@Directive({ selector: '[mouseWheel]' })
export class MouseWheelDirective {
throttleTime: number =;
@Output() mouseWheelUp = new EventEmitter();
@Output() mouseWheelDown = new EventEmitter();
@HostListener('mousewheel', ['$event']) onMouseWheelChrome(event: any) {
this.throttle(this.mouseWheelFunc, 2000, event)();
View scroll-slideshow.component.ts
import { Component, OnInit, ContentChildren, QueryList, AfterContentInit, ViewChildren, AfterViewInit } from '@angular/core';
import { ScrollSlideshowItemComponent } from '../scroll-slideshow-item/scroll-slideshow-item.component';
selector: 'scroll-slideshow',
templateUrl: './scroll-slideshow.component.html',
styleUrls: ['./scroll-slideshow.component.css']
export class ScrollSlideshowComponent implements OnInit, AfterViewInit {
slides = ["Here is slide1", "Here is slide 2", "Here is slide 3", "Questions?"];
View scroll-slideshow-item.component.ts
import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
import { trigger, transition, animate, style, state, animation, useAnimation } from '@angular/animations';
export const enterAnimation = animation([
style({ opacity: 0, transform: 'translateX({{ initEnterTranslate }})' }),
animate('1000ms ease-in', style({ opacity: 1, transform: 'translateX(0%)' }))
export const exitAnimation = animation([
View scroll-slideshow.component.html
<div class="slide-show-container" mouseWheel (mouseWheelUp)="onMouseWheelUpFunc()"
<scroll-slideshow-item *ngFor="let slide of slides ; let i = index">
{{i + 1 }}. {{slide}}
View scroll-slideshow-item.component.html
<div #slideshowitem
[@scrollTrigger]="{ value : show, params : { initEnterTranslate : enterInitPosition, exitTranslate : exitPosition }}"
class="slide-show-item" *ngIf="show">
View scroll-slideshow.component.css
.slide-show-container {
background-color : black;
color : white;
position : relative;
width : 100vw;
height : 95vw;
View scroll-slideshow-item.component.css
.slide-show-item {
font-size : 13vw;
width: 99vw;
height: 95vh;
background-color : black;
color : red;
border : 2px solid white;
position : absolute;
top : 0;
left : 0;
#Configuration Parameters
APACHE_LOG_DIR=<Your apache log dir with full path>
APACHE_LOG_FILE=<Your apache log file with full path>
SCRIPT_DIR=<Your scripts directory with full path>
SERVICES_LIST=<Space separated list of service URIs for which you want to assess performance>
FROM_EMAIL_ADDR=<From email address>
TO_EMAIL_ADDRESSES=<Comma separated list of to email addresses>
SERVICE_BASE_URI=<Your service base URI that can identify all your services>
View getApachePerformanceStats.awk
print "<OL>";
if(responseTimeArray[2] > 4000000)
print "<li>",$0, a[2],":",responseTimeArray[2],"</li>";
View oracle-audit-trigger-002.sql
table_columns_stg AS (SELECT c.table_name,
FROM prm_input t, user_tab_columns c
WHERE t.table_name = c.table_name),