Skip to content

Instantly share code, notes, and snippets.

View robpataki's full-sized avatar

Rob Pataki robpataki

  • Valtech
  • York UK
View GitHub Profile
@robpataki
robpataki / .prettierrc
Created October 25, 2023 15:54
Prettier config (TypeScript, React, SCSS)
{
"printWidth": 132,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
@robpataki
robpataki / pointer.ts
Last active October 13, 2023 15:23
Pointer utility class for tracking pointer movement and clicks
let instance: Pointer;
/**
* Tracks the pointer in WebGL
*/
export default class Pointer {
/**
* Current coordinates
* @return {x: number, y: number} The current pointer coordinates.
*/
@robpataki
robpataki / xld_filename.md
Last active August 25, 2023 11:38
File naming convention for XLD encoding

Compilations:

%A - %T  -  %n - %a - %t

Albums by 1 artist

%A - %T  -  %n - %t
@robpataki
robpataki / .zshrc
Last active July 14, 2023 11:52
.zshrc
# Load SSH keys
ssh-add --apple-use-keychain ~/.ssh/id_rsa
ssh-add --apple-use-keychain ~/.ssh/bb_rsa
ssh-add --apple-use-keychain ~/.ssh/gh-per_rsa
ssh-add --apple-use-keychain ~/.ssh/gitlab_rsa
# Turn on Git completion
autoload -Uz compinit && compinit
# Git aware prompt
@robpataki
robpataki / .zshenv
Last active July 14, 2023 11:51
.zshenv
# Basics
export PATH="/opt/homebrew/bin:/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/etc:/usr/local/mysql/bin:$PATH"
# export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_192.jdk/Contents/Home"
# Editor
export EDITOR="code -w"
export BUNDLE_EDITOR="code"
@robpataki
robpataki / _grid-settings.scss
Created February 28, 2023 18:08
Sass grid system with responsive breakpoint mixin
$columns: (
xs: 2,
s: 2,
m: 8,
l: 12,
xl: 12,
);
$gutters: (
xs:20px,
s: 20px,
@robpataki
robpataki / settings.json
Last active October 10, 2022 16:29
Visual Studio Code user settings
{
"eslint.run": "onSave",
"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
],
@robpataki
robpataki / _easing-functions.scss
Last active August 10, 2022 18:51
Easing functions to be used in SCSS
// Easing function variables - http://easings.net/#easeOutQuint
// SINE
$ease-in-sine: cubic-bezier(0.47, 0, 0.745, 0.715);
$ease-out-sine: cubic-bezier(0.39, 0.575, 0.565, 1);
$ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);
// QUAD
$ease-in-quad: cubic-bezier(0.55, 0.085, 0.68, 0.53);
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
@robpataki
robpataki / svg-connector.js
Created May 4, 2017 18:40
SVG Connector helps with drawing connections between coordinates using dots and lines
// Colour scheme: https://coolors.co/f61067-5e239d-00f0b5-6decaf-f4f4ed
var NS = 'http://www.w3.org/2000/svg';
var Victor = function(artboardElementSelector) {
if (typeof artboardElementSelector === 'string') {
this.setArtboard(artboardElementSelector);
}
this.connections = {
@robpataki
robpataki / how-we-do-git.md
Last active May 30, 2022 15:16
This is how we do git (rebase, feature branches, PRs)

How to / Git

Branching strategy

We use a form of Git flow to maintain a stable master branch, and work off feature branches to introduce new features and other code updates. The feature branches are tied to JIRA tickets.

To keep our git log clean and tidy we use git's rebase strategy. That means that instead of merging commits in and out of the master branch (resulting in many ugly merge commits) we always keep our own feature branch's commits on top of the existing master branch commits.

You can read more about the rebase strategy here: https://www.atlassian.com/git/tutorials/merging-vs-rebasing.