Skip to content

Instantly share code, notes, and snippets.

View devversion's full-sized avatar

Paul Gschwendtner devversion

View GitHub Profile
@devversion
devversion / GetClanRank.sql
Last active August 29, 2016 22:00
Some sick MySQL query
SELECT sb.rang
FROM (
SELECT sq.clan, (@num := @num +1) as rang FROM (
SELECT
mcm.cname AS clan,
SUM(ms.trophies) AS trophies
FROM MuxClanMembers AS mcm
LEFT JOIN MuxUser AS ms
ON mcm.uuid = ms.uuid
WHERE mcm.eingeladen = 0
<!DOCTYPE html>
<html>
<head>
<title>Christmas Rendering</title>
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<style type="text/css">
body, html {
#!/bin/bash
find . -type f -print | while read f; do
mv -i "$f" "$f.recode.$$"
iconv -f iso-8859-1 -t utf-8 < "$f.recode.$$" > "$f"
rm -f "$f.recode.$$"
done
@devversion
devversion / .block
Last active October 11, 2016 15:35 — forked from klabelle33/.block
Test
license: mit
@devversion
devversion / Dockerfile
Created October 31, 2016 14:35
Angular 2 Dockerfile Material 2
FROM node:latest
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Copy node package to working directory
COPY package.json /usr/src/app
# Install Node dependencies
@devversion
devversion / ts-ast-heritages.ts
Created February 8, 2017 22:22
TypeScript Member Heritage AST
sourceFiles.forEach(function(file) {
ts.forEachChild(file, visitNode);
});
/**
* @param {ts.Node} node
**/
function visitNode(node) {
if (!isNodeExported(node)) {
return;
import {Component, Injectable, NgModule} from '@angular/core';
/*
* Some service to test dependency injection. Not relevant to read.
*/
@Injectable({providedIn: 'root'})
export class SomeService {}
/*
@devversion
devversion / _mdc-form-field-standard-appearance.scss
Created December 16, 2019 17:50
MDC-based form-field standard appearance
@import '@material/rtl/mixins';
@import '@material/floating-label/mixins';
@import '@material/textfield/variables';
@import 'form-field-sizing';
// Styles for the standard appearance in the MDC-based form-field. MDC has styles for
// full-width text-fields which kind of look like the standard appearance. Though these
// styles cannot be used because they do not work for inputs with floating labels, or
// textareas which are intended to be displayed in the standard appearance. We create our
// own styles for the standard appearance that work for all types of inputs and textareas
@devversion
devversion / check_no_changes.ts
Created December 19, 2019 10:50
View Engine Change Detection vs. CheckNoChanges
markProjectedViewsForCheck(view);
Services.updateDirectives(view, CheckType.CheckNoChanges);
execEmbeddedViewsAction(view, ViewAction.CheckNoChanges);
Services.updateRenderer(view, CheckType.CheckNoChanges);
execComponentViewsAction(view, ViewAction.CheckNoChanges);
// Note: We don't check queries for changes as we didn't do this in v2.x.
// TODO(tbosch): investigate if we can enable the check again in v5.x with a nicer error message.
view.state &= ~(ViewState.CheckProjectedViews | ViewState.CheckProjectedView);
diff --git a/src/material/core/common-behaviors/tabindex.ts b/src/material/core/common-behaviors/tabindex.ts
index b5788d46c..3be2d0193 100644
--- a/src/material/core/common-behaviors/tabindex.ts
+++ b/src/material/core/common-behaviors/tabindex.ts
@@ -23,10 +23,15 @@ export interface HasTabIndex {
/** @docs-private */
export type HasTabIndexCtor = Constructor<HasTabIndex>;
+// Needs JSDOC
+type LooseConstructor<T> = Function & { prototype: T };