This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function translate_shortcode( $atts = [], $content = null, $tag = '' ) { | |
// Get current URI and set cache timeout | |
$current_url = $_SERVER["REQUEST_URI"]; | |
$cache_timeout = 86400; | |
// normalize attribute keys, lowercase | |
$atts = array_change_key_case( (array) $atts, CASE_LOWER ); | |
// override default attributes with user attributes | |
$custom_atts = shortcode_atts( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
choco install sqlite | |
sqlite3 grafana.db 'PRAGMA journal_mode=wal;' | |
az login | |
az storage copy -s .\grafana.db -d https://<storage_account>.file.core.windows.net/<file_share> --subscription <subscription_name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { BasePageComponent } from '../base-page/base-page.component'; | |
@Component({ | |
selector: 'app-first-page', | |
templateUrl: './first-page.component.html', | |
styleUrls: ['./first-page.component.scss'] | |
}) | |
export class FirstPageComponent extends BasePageComponent implements OnInit { | |
private _clickCnt = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { GoogleAnalyticsService } from '../google-analytics.service'; | |
@Component({ | |
template: '', | |
}) | |
export class BasePageComponent implements OnInit { | |
constructor(protected $gaService: GoogleAnalyticsService) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { GoogleAnalyticsService } from '../google-analytics.service'; | |
@Component({ | |
selector: 'app-first-page', | |
templateUrl: './first-page.component.html', | |
styleUrls: ['./first-page.component.scss'] | |
}) | |
export class FirstPageComponent implements OnInit { | |
private _clickCnt = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logEvent(event, category, label, value) { | |
gtag('event', event, { | |
event_category: category, | |
event_label: label, | |
value: value | |
}); | |
console.log('gtag event captured...'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { GoogleAnalyticsService } from './google-analytics.service'; | |
@Component({ | |
selector: 'app-root', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.scss'] | |
}) | |
export class AppComponent implements OnInit { | |
title = 'Google Analytics Service'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { AppRoutingModule } from './app-routing.module'; | |
import { AppComponent } from './app.component'; | |
import { GoogleAnalyticsService } from './google-analytics.service'; | |
@NgModule({ | |
declarations: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Injectable } from '@angular/core'; | |
import { Router, RouterEvent, NavigationEnd } from '@angular/router'; | |
import { filter } from 'rxjs/operators'; | |
import { environment } from '../environments/environment'; | |
declare var gtag: any; | |
@Injectable({ | |
providedIn: 'root' | |
}) |
NewerOlder