Skip to content

Instantly share code, notes, and snippets.

View artworkad's full-sized avatar
✌️

Artjom Zab artworkad

✌️
View GitHub Profile
<div class="mt-1 relative" x-data="Components.customSelect({ open: false, value: 0, selected: 0 })" x-init="init()">
<button
type="button"
x-ref="button"
@keydown.arrow-up.stop.prevent="onButtonClick()"
@keydown.arrow-down.stop.prevent="onButtonClick()"
@click="onButtonClick()"
aria-haspopup="listbox"
:aria-expanded="open"
aria-labelledby="listbox-label"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAQCAwMDAgQDAwMEBAQEBQkGBQUFBQsICAYJDQsNDQ0LDAwOEBQRDg8TDwwMEhgSExUWFxcXDhEZGxkWGhQWFxYBBAQEBQUFCgYGChYPDA8WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFv/CABEIAyAEsAMBIgACEQEDEQH/xAAdAAACAgMBAQEAAAAAAAAAAAABAgADBAUGBwgJ/9oACAEBAAAAAMF7K97OK6oK8jKzZeTXZhBCHWxXV48IZiqQgoJKtdsyYEiKvPc3idr5B6D2udqvG8Ld+10UeV7To681qglMget6KgVUhwHEURLVUmLI1Yqw9drNx1phUw1KudXS5lb14HTLdTvLuI61CDHUWZOVU9Fdbwx0JsLOoJJDRYJANdsQIjQCrRcxg9p5H3vbburw3T7/ANuxKPJdr065DgVKsUiDGEQqwBjKgivVMhQCBFXC1um2vbWUAswrQbCpXUKa9du4E39vGdLYCQwLZOWrYyQPFYFwZYFYyQspNgCYOe9REWSvScxrO28o9G6/cjwPTdN7Bit5VsuqGUKwmPGjpdipVSzqGrMZSKLYjFwpapjjYuq0G77m2hWBCI2dKijgprcmPVvb+O6UvHdLIuXnVnA4Xl8Na1qgptqqRKSEhrMu6fe1uuNcaYmLiYUxacOrodT0e0jcxiZnTrdzlu2N7lY73MGuowqYstZr6uWxhGsdrbbbntey+ZCTW6bf95YlUMCrNmlcau2tdaI022Tx/VFYXYyy7YjXeB8eKq0iVisKqisMTU6pL7wVUsGgCFUamywOHjV2KxEtrLGOjMCGxtcoqsUPDjyBpAZDFj1hxLNj6P7DlkyKhmdUt1bl69XhNbTucrk+oVJbCxbK2uL4J5rsatUkNRArNdlauVUxBU6EqIVjiBootQSM8YMyMRCyixDIShataQAId
#standardSQL
WITH `project.dataset.table` AS (
SELECT 1 customer_id, -500 value,
DATE '2019-10-12' timestamp UNION ALL
SELECT 1, -300, '2019-10-11' UNION ALL
SELECT 1, -200, '2019-10-10' UNION ALL
SELECT 2, 200, '2019-09-10' UNION ALL
SELECT 2, 100, '2019-08-10' UNION ALL
SELECT 2, 50, '2019-07-10' UNION ALL
SELECT 1, 600, '2019-09-02'
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<template encoding-version="1.2">
<description></description>
<groupId>15ada4b2-016d-1000-5082-9ad39d94fbb1</groupId>
<name>SUM</name>
<snippet>
<connections>
<id>153e5470-27c9-376a-0000-000000000000</id>
<parentGroupId>9420f1f3-b071-33b3-0000-000000000000</parentGroupId>
<backPressureDataSizeThreshold>1 GB</backPressureDataSizeThreshold>
@Middleware()
export class MulterMiddleware implements NestMiddleware {
resolve(): (req, res, next) => void {
const upload = multer({ dest: "" });
return upload.any();
}
}
@Module({
modules: [DatabaseModule, HttpExceptionModule, LoggerModule, StorageModule],
@artworkad
artworkad / IconTabLayout.kt
Last active March 14, 2017 17:28
Android TabLayout with icons and color state list
/**
* IconTabLayout is an extension of TabLayout and enables us to use icons instead of
* text for the tabs. To reuse a single icon for different states we simply tint it
* with color state list. I use vector drawables for icons.
*/
class IconTabLayout : TabLayout {
private var viewPager: ViewPager? = null
constructor(context: Context) : super(context)
@artworkad
artworkad / auth-guard.service.ts
Created February 21, 2017 11:31
Building an Authentication Observable Data Service - auth-guard.service.ts
import {Injectable} from '@angular/core';
import {CanActivate, Router, ActivatedRouteSnapshot, RouterStateSnapshot} from '@angular/router';
import {Observable} from 'rxjs/Observable';
import {AuthService} from './auth.service';
@Injectable()
export class AuthGuard implements CanActivate {
constructor(private authService: AuthService,
private router: Router) {