Skip to content

Instantly share code, notes, and snippets.

View svallory's full-sized avatar
:bowtie:
Coding like there's no tomorrow

Saulo Vallory svallory

:bowtie:
Coding like there's no tomorrow
View GitHub Profile
@svallory
svallory / test-index.js
Created April 4, 2019 12:20
VSCode Stryker Mutator test
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
/* tslint:disable no-require-imports */
const fs = require("fs");
const path = require("path");
const glob = require("glob");
const paths = require("path");
const istanbul = require('istanbul');
@svallory
svallory / README.md
Created October 25, 2021 00:26
Figma Plugin Development Live Reload

Figma Plugin Development Live Reload

  1. Create a run-plugin.sh somewhere in your project
  2. Copy the code from the run-plugin.sh file in this gist
  3. Install nodemon with yarn add --dev nodemon
  4. Add a script in the scripts property of your package.json replacing PLUGIN_CODE_FOLDER by the path to the folder where your plugin code lives
    "scripts": {
    

"livereload": "nodemon --watch PLUGIN_CODE_FOLDER --exec run-plugin.sh"

@svallory
svallory / Emoji and Unicode.txt
Created December 8, 2022 18:42
Just playing with possible meaning of emojis in code
Commands: 🎮 🕹 ⚙ ⌨ 🎚 🎛 ⌘ 🚦 🚥 🙏 🙏🏼 ⌃ ^
Receive: 📥 📩 📨 📬
Publish: 📰 📢
Change: ⚡️
Negative: 🚫 🛑 ❌ ❎ ⤫
Warning: ⚠️ 🚨 🚧 ⛔ ⚠️⚠
Notify: 🔔 🎉 📟 📢 📣 🗣 🔊
Mail: 📨 📤 📥 📧 📩 📪 📫 📬 📭 📮 📦
Time: ⏰ ⏱ ⏲ ⏳ ⌛ ⧗ ⧖
Movement: 🚀 🛫 🛬
@svallory
svallory / ui.disl
Created December 15, 2022 21:09
Disl for UI
ui Web
/**
* Defines a context for the screens
* A context is a set of screens that are related to each other.
* It can have preconditions that are checked before allowing the user to
* navigate to the screens in the context.
*
* A context can have preconditions that are checked before allowing the user
* to navigate to the screens in the context.
*
@svallory
svallory / foo.md
Created December 17, 2022 02:42
Testing Gists VS extension

hehehe

@svallory
svallory / value-object-proxied-base-class.ts
Created January 25, 2023 21:19
Magic catch-all method in Typescript class by extending Javascript Proxy class to build the perfect Value Object base class
type Setters<Type> = {
[Property in keyof Type as `set${Capitalize<string & Property>}`]: (newValue: Type[Property]) => Type & Setters<Type>
};
abstract class VO<T> {
constructor(
public readonly type: any,
public readonly excludedProperties: string[],
) {
return (new Proxy(this, {
@svallory
svallory / App.svelte
Created May 24, 2023 17:28
SomeSwing
<script lang="ts">
let name: string = "world";
</script>
<h1>Hello asdf {name}!</h1>
@svallory
svallory / Quake-style Hotkey Window for Wezterm.json
Created September 17, 2023 01:31
Quake-style Hotkey Window for Wezterm
{
"title": "Quake-style Hotkey Window for Wezterm",
"rules": [
{
"description": "Launch/show Wezterm if it is not in foreground",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "escape",
@svallory
svallory / moon-launch.sh
Created December 21, 2023 23:56
Auto-migrate a monorep to moon
#!/bin/bash
# Check if `proto` is installed, if not, ask for user confirmation to install
if ! command -v proto &>/dev/null; then
echo "Proto is not installed. Do you want to install Proto? (y/N)"
read -r user_confirmation
if [[ $user_confirmation == [yY] ]]; then
# Command to install Proto
echo "Installing Proto..."
curl -fsSL https://moonrepo.dev/install/proto.sh | bash
@svallory
svallory / debug-tag.marko
Last active January 30, 2024 03:47
Marko Tags API Guide
<lifecycle onMount() {
console.log('Debug Tag', component);
}/>
<return=component/>