- How to write performant JS and CSS
- How to measure performance in chrome
- How to bundle in 2017 (webpack commonschunkplugin, code splitting etc.)
- Workshop how to optimize JS performance
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
using System.Text.RegularExpressions; | |
using System.Web; | |
using EPiServer.Core; | |
using EPiServer.ServiceLocation; | |
using EPiServer.Web.Routing; | |
namespace Sintef.Common.Util | |
{ | |
public class LegacyRedirector | |
{ |
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 { NgRedux } from 'ng2-redux'; | |
import { ISubscription } from 'rxjs/Subscription'; | |
export const selectAndSubscribe = <T>( | |
statePathOrFunc?: string | | |
(string | number)[] | | |
Function, | |
comparer?: (x: any, y: any) => boolean) => (target, key) => { | |
let bindingKey = statePathOrFunc; |
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
using System; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.Filters; | |
using System.Web.Http.ModelBinding; | |
using CDNAdmin.Web.Exceptions; |
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 { applyMiddleware, createStore, compose } from 'redux'; | |
import thunkMiddleware from 'redux-thunk'; | |
const middlewares = [thunkMiddleware]; | |
let composeEnhancers = compose; | |
if (process.env.NODE_ENV !== 'production') { | |
/* eslint-disable no-underscore-dangle */ | |
composeEnhancers = | |
window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || composeEnhancers; |
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 { useState, useEffect, RefObject } from 'react'; | |
import ResizeObserver from 'resize-observer-polyfill'; | |
export interface IDOMRectReadOnly { | |
readonly width: number; | |
readonly height: number; | |
readonly top: number; | |
readonly left: number; | |
readonly right: number; | |
readonly bottom: number; |
I hereby claim:
- I am dagstuan on github.
- I am dagstuan (https://keybase.io/dagstuan) on keybase.
- I have a public key ASDaqym1wobjDRGYjCdstxowxZC0CE-XNhx08wAPliYlVAo
To claim this, I am signing this object:
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 produce from 'immer'; | |
export function getIn<T>( | |
object: Record<string, unknown>, | |
keyOrKeyPath: string | string[] | number | symbol, | |
notSetValue: T, | |
): T; | |
export function getIn<T>(object: Array<unknown>, key: string | number): T; | |
export function getIn<T>( | |
object: Record<string, unknown>, |
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 { useEffect, useState, useCallback } from 'react'; | |
import { useLatest } from './useLatest'; | |
export function useClickOutsideComponent<T extends HTMLElement>( | |
callback: (event?: MouseEvent | TouchEvent) => void, | |
) { | |
const latestCallback = useLatest(callback); | |
const [domNode, setDomNode] = useState<T>(); | |
const ref = useCallback((node: T | null) => { |
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
var inputs: string[] = readline().split(' '); | |
const width: number = parseInt(inputs[0]); | |
const height: number = parseInt(inputs[1]); | |
const playercount: number = parseInt(inputs[2]); | |
const foodcount: number = parseInt(inputs[3]); | |
const myid: number = parseInt(inputs[4]); | |
type Position = { | |
x: number, | |
y: number, |
OlderNewer