Skip to content

Instantly share code, notes, and snippets.

View vysinsky's full-sized avatar

Michal Vyšinský vysinsky

View GitHub Profile
using System;
using System.Collections.Generic;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.EnhancedTouch;
using Touch = UnityEngine.InputSystem.EnhancedTouch.Touch;
using TouchPhase = UnityEngine.InputSystem.TouchPhase;
@vysinsky
vysinsky / opener.js
Created March 9, 2022 12:47
SFCC toolkit opener for JetBrains IDEs
/**
* If you are SFCC developer and want to use JetBrains IDEs (or any other than VSCode) you can use this script to listen on port 60606 which is the VSCode prophet extensions port.
* It will open files in your favourite IDE.
* Ensure you have VSCode closed first as it listens on same port. If not, you will encounter the `EADDRINUSE` error.
* No need to use this if you want to open file in VSCode ;)
*
* Args:
* * basePath - defaults to cwd + '/storefront-reference-architecture/cartridges'
* * launcher - defaults to 'pstorm'
*
using UnityEngine;
namespace Animations
{
public class PositionTransition
{
private readonly float _duration;
private readonly Vector3 _from;
private readonly Vector3 _to;
using UnityEngine;
namespace Animations
{
public class PositionTransition
{
private readonly float _duration;
private readonly Vector3 _from;
private readonly Vector3 _to;
import { GraphQLClient } from 'graphql-request';
import { print } from 'graphql';
import { SdkFunctionWrapper, defaultWrapper } from '@graphql-codegen/typescript-graphql-request';
import gql from 'graphql-tag';
export type Maybe<T> = T | null;
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: string;
String: string;
Boolean: boolean;
{
"schema": "./schema.json",
"generates": {
"./src/generated/graphql.d.ts": {
"overwrite": true,
"plugins": ["typescript", "typescript-graphql-request"]
}
}
}
# This file was generated based on ".graphqlconfig". Do not edit manually.
schema {
query: Query
}
type CollectionMetadata {
count: IntType!
}
@vysinsky
vysinsky / CameraAuthoring.cs
Last active December 3, 2019 20:32
Custom entity authoring behaviour for Camera object.
using Unity.Entities;
using Unity.Transforms;
using UnityEngine;
namespace Acme.Authoring
{
/// <summary>
/// Custom authoring way must be used because converting Camera object to Entity in traditional way (ConvertToEntity nor SubScene) does not work.
/// </summary>
[DisallowMultipleComponent]
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run start --scripts-prepend-node-path=auto
> @dc/ui-library@3.23.3 prestart /Users/vysinm01/work/ui-library
> npm run build:lib:icons && npm run stylus:generate-vars
> @dc/ui-library@3.23.3 build:lib:icons /Users/vysinm01/work/ui-library
> svg-icon-generate --keepFillColor --svgDir src/atoms/icons/svg --destination src/atoms/icons/index.js --template src/atoms/icons/index.template && node ./npm_scripts/fixIconClasses.js
Running SVG Icon generator with the following options:
const Listr = require('listr');
const execa = require('execa');
const axios = require('axios');
const helpers = require('../utils/helpers');
const execute = require('../utils/execute').execute;
const ExecutionError = require('../utils/ExecutionError');
module.exports = backstopInParallel => ({
title: 'Testing',
enabled: ctx => ctx.stages.indexOf('test') > -1,