Skip to content

Instantly share code, notes, and snippets.

View pescode's full-sized avatar

Victor Corvalan pescode

View GitHub Profile
@pescode
pescode / IdentifiableListView.swift
Created April 7, 2020 02:42
Getting the index number of an item in an Array of Identifiables
import SwiftUI
struct IdentifiableListView: View {
@State var userList = [
Users(name: "Sarah", lastName: "Gates"),
Users(name: "Jack", lastName: "Black"),
Users(name: "Kate", lastName: "Anderson"),
Users(name: "Bill", lastName: "Jobs"),
Users(name: "Steve", lastName: "Gates")
]
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using System.Collections.Generic;
using Facebook.Unity;
using Facebook.MiniJSON;
using System;
public class FBManager : MonoBehaviour {
@pescode
pescode / ChangeText.sketchplugin
Last active December 5, 2017 12:38
Automatically replace text value on SketchAPP, ideal for localization!. Just copy & paste the following script on Plugin->Custom Plugin
// Author: Victor Corvalan
var mkt01 = "#";
var mkt02 = "#";
var font_name = "";
var doc = context.document;
mkt01 = [doc askForUserInput:'Text to replace:' initialValue:''];
mkt02 = [doc askForUserInput:'New text value:' initialValue:''];
font_name = [doc askForUserInput:'Change FONT:' initialValue:''];
var layers;
@pescode
pescode / Android Icons.jsx
Last active July 7, 2020 23:36
Unity Icons Generator for Win Store, Android & iOS Photoshop Script
// Based on https://gist.github.com/appsbynight/3681050 by Matt Di Pasquale
// Author: Victor Corvalan
// http://twitter.com/pescadon
// This script will generate squares and wide Icons & Tiles required for Windows Store build on Unity3D
// Prepare 1 big icon of 512x512px
// Open this script with Photoshop -> File -> Scripts -> Browse
// Load your icon when prompted
var destFolder;
try