Skip to content

Instantly share code, notes, and snippets.

View sameera's full-sized avatar
👨‍🎓
In research mode

Sameera Perera sameera

👨‍🎓
In research mode
View GitHub Profile
@sameera
sameera / Working with dates.EXCEL.yaml
Last active January 6, 2021 01:58 — forked from jag-cloudextend/Working with dates.EXCEL.yaml
Shows how to work with dates by using the Moment JavaScript library with the Moment-MSDate plug-in.
name: Working with dates
description: >-
Shows how to work with dates by using the Moment JavaScript library with the
Moment-MSDate plug-in.
host: EXCEL
api_set: {}
script:
content: |
declare var moment: any;
@sameera
sameera / ngrx-event-store.ts
Last active November 28, 2020 02:34
An Event Store for NgRx
import { Injectable } from "@angular/core";
import {
Action,
ActionsSubject,
ReducerManager,
StateObservable,
Store,
} from "@ngrx/store";
import { of, EMPTY, OperatorFunction } from "rxjs";
// This file was initially generated by Windows Terminal 1.3.2651.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
#requires -Version 2 -Modules posh-git
function Write-Theme {
param(
[bool]
$lastCommandFailed,
[string]
$with
)
@sameera
sameera / jestdbg.ps1
Created October 20, 2020 04:46
Generate VS Code launch.json file that debugs jest
param([string]$relativePath = "")
if ($relativePath -eq $null) {
Write-Error "Specify a file to debug."
exit 1
}
$file = Resolve-Path -Path $relativePath
$matches = $file | Select-String -Pattern "(?<root>.*\/)(apps|libs)\/(?<prj>.*?)\/src/.*"
Title Author Genre Height Publisher
Fundamentals of Wavelets Goswami, Jaideva signal_processing 228 Wiley
Data Smart Foreman, John data_science 235 Wiley
God Created the Integers Hawking, Stephen mathematics 197 Penguin
Superfreakonomics Dubner, Stephen economics 179 HarperCollins
Orientalism Said, Edward history 197 Penguin
Nature of Statistical Learning Theory, The Vapnik, Vladimir data_science 230 Springer
Integration of the Indian States Menon, V P history 217 Orient Blackswan
Drunkard's Walk, The Mlodinow, Leonard science 197 Penguin
Image Processing & Mathematical Morphology Shih, Frank signal_processing 241 CRC
Fundamentals of Wavelets Goswami, Jaideva signal_processing 228 Wiley
Data Smart Foreman, John data_science 235 Wiley
God Created the Integers Hawking, Stephen mathematics 197 Penguin
Superfreakonomics Dubner, Stephen economics 179 HarperCollins
Orientalism Said, Edward history 197 Penguin
Nature of Statistical Learning Theory, The Vapnik, Vladimir data_science 230 Springer
Integration of the Indian States Menon, V P history 217 Orient Blackswan
Drunkard's Walk, The Mlodinow, Leonard science 197 Penguin
Image Processing & Mathematical Morphology Shih, Frank signal_processing 241 CRC
name: Table slow-perf workaround
description: 'https://github.com/OfficeDev/office-js/issues/12'
author: sameera
host: EXCEL
api_set: {}
script:
content: |+
wireUp("#setup", setup);
wireUp("#run1", run1);