Skip to content

Instantly share code, notes, and snippets.

View Polyterative's full-sized avatar

Vlady Yakovenko Polyterative

View GitHub Profile
import android.content.Context;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v4.view.ViewCompat;
import android.util.AttributeSet;
import android.view.View;
import java.util.List;
@Polyterative
Polyterative / angular template variables example
Last active May 12, 2021 12:02
Allows to declare anglar variables in the template to unify subscriptions for example
<div *ngIf='{
userActions:(dataService.userActions$|async)
} as globalBag'
>
<ng-container *ngIf='{
timepointCount:(globalBag.timePoints.length),
widthObject:({"width.%": globalBag.zoomValue+""})
}as lowerBag'
>
@Polyterative
Polyterative / cloudSettings
Last active August 15, 2021 13:17
VSCode settings
{"lastUpload":"2021-08-15T13:17:53.910Z","extensionVersion":"v3.4.3"}
@Polyterative
Polyterative / download-from-undraw.py
Created May 12, 2021 12:00 — forked from heypoom/download-from-undraw.py
Download every svg file from undraw.
#!/usr/bin/env python3
import os
import json
import requests
from multiprocessing.pool import ThreadPool
def build_index():
page = 1
@Polyterative
Polyterative / main 2021.1.ahk
Created November 13, 2021 17:38
Main fulltime autohotkey script
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
;https://www.autohotkey.com/docs/KeyList.htm
;n::o
;o::n
$colors: (
'bg': #263137,
'primary': #8EA1BC,
'braces': #6F8796,
'dot': #89DDFF,
'string': #CDCDCD,
'class': #4DB769,
'intreface': #BE89E9,
'variable': #F49446,
'static-field': #E69E6E,
@Polyterative
Polyterative / Angular TS Pastebin.ts
Last active January 5, 2022 14:24
common angular code
constructor(
private dialogRef: MatDialog,
public dataService: DataService,
public router: Router,
public route: ActivatedRoute
) {
this.route.params
.pipe(
@Polyterative
Polyterative / custom.js
Last active December 7, 2022 10:53
Serenade script
let intellij = serenade.app("intellij");
let global = serenade.global();
let chrome = serenade.app("chrome");
// Display an alert box with the message "Hello, world!"
// alert("Hello, world!");
// Define global shortcut keys for common actions
global.key("cut", "x", ["ctrl"]); // Cut the selected text
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using System.Reactive.Subjects;
namespace KeystrokeRedo
{
class Program
{
select all: key(ctrl-a)
undo: key(ctrl-z)
save: key(ctrl-s)
copy: key(ctrl-c)
cut: key(ctrl-x)
drop: key(ctrl-v)
special drop: key(win-v)
# close: key(ctrl-w)
tab right: key(ctrl-tab)