Skip to content

Instantly share code, notes, and snippets.

View tomitrescak's full-sized avatar
🏠
Working from home

Tomas Trescak tomitrescak

🏠
Working from home
  • University of Western Sydney
  • Sydney, Australia
View GitHub Profile
@tomitrescak
tomitrescak / index.pl
Created October 10, 2017 11:04
Synology - Auto Index support
#!/usr/bin/perl
#
# Alternative Syno Indexer
# ASI
# release 1
#
# This script will smartly update Media Index on your Synology appliance
# You can create 'noindex' file under scan directory to skip subdir indexing
# Works on DSM 6+
vite:hmr [file change] src/modules/ei/ei_layout.tsx +39s
7:28:42 pm [vite] page reload src/modules/ei/ei_layout.tsx
vite:resolve 3.32ms /ei/din/roles?ei=din -> null +38s
vite:spa-fallback Rewriting GET /ei/din/roles?ei=din to /index.html +41s
vite:time 14.49ms /index.html +38s
vite:cache [304] /@vite/client +39s
vite:time 2.04ms /@vite/client +38ms
vite:load 0.91ms [fs] /src/index.ts +39s
vite:import-analysis 20.68ms [3 imports rewritten] src\index.ts +39s
vite:transform 23.01ms /src/index.ts +39s
@tomitrescak
tomitrescak / semantic-ui-react.d.ts
Last active October 29, 2021 13:43
Typescript binding for semantic-ui-react
// Generated by typings
// Source: ../../../../Downloads/semantic-ui-react.d.ts
declare namespace _semanticUIReact {
// import ListItemContent = __ReactMDL.ListItemContent;
type InputType = 'color' | 'date' | 'datetime' | 'datetime-local' | 'email' | 'number' | 'range' | 'search' | 'select' | 'password' | 'tel' | 'text' | 'time' | 'url' | 'week'
type SemanticCOLORS = 'red' | 'orange' | 'yellow' | 'olive' | 'green' | 'teal' | 'blue' | 'violet' | 'purple' | 'pink' | 'brown' | 'grey' | 'black' | 'twitter' | 'google plus' | 'facebook'
type SemanticSOCIAL = 'facebook' | 'google plus' | 'vk' | 'twitter' | 'linkedin' | 'instagram' | 'youtube'
{
"$type": "bpmn:Definitions",
"id": "Definitions_1akzsyb",
"targetNamespace": "http://bpmn.io/schema/bpmn",
"exporter": "Camunda Modeler",
"exporterVersion": "2.2.4",
"rootElements": [
{
"$type": "bpmn:Collaboration",
"id": "Collaboration_0y95kdl",
@tomitrescak
tomitrescak / graphql.tsx
Created December 18, 2018 01:13
graphql.schema.json
{
"__schema": {
"queryType": { "name": "Query" },
"mutationType": { "name": "Mutation" },
"subscriptionType": null,
"types": [
{
"kind": "OBJECT",
"name": "Query",
"description": "",
import { IObservableArray, toJS } from 'mobx';
import { types } from 'mobx-state-tree';
import { UndoManager } from 'mst-middlewares';
import { QueryTypes } from 'data/client';
import { DataDescriptor, DataSet } from './form_model';
export type IValidator = (input: string) => string;
export type IFormStore = typeof FormStore.Type;
@tomitrescak
tomitrescak / cloudSettings
Last active August 5, 2018 08:35
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-07-18T07:37:07.603Z","extensionVersion":"v3.0.0"}
@tomitrescak
tomitrescak / result.ts
Last active July 25, 2018 20:46
Medium - Resolvers
// the types below do all the heavy lifting of making everything type safe
import { Mutation, Notification, Query, Resolver } from './utils';
export const query: Query = {
// hit cmd+space and feel the magic
// params and ctx are type safe, parent and info are 'any'
notifications(_parent, params, ctx, info) {
}
};
// file: utils.ts
import { GraphQLResolveInfo } from 'graphql';
import { Mutation as ApiMutation, Query as ApiQuery } from './generated/api';
import { Prisma } from './generated/prisma';
import * as Types from './types; // you can omit this
export type FirstArgument<T> = T extends (arg1: infer U, …args: any[]) => any ? U : any;
export type Remapped<T> = {
 [P in keyof T]: (
 parent: null | undefined,
 args: FirstArgument<T[P]>,
import { Query } from './utils';
export const query: Query = {
 // hit cmd+space here and hear "who let the dogs out!"
}