If you don't have sudo
access (like on a work-managed machine), you can still install Homebrew locally.
-
Create a Homebrew directory:
mkdir -p ~/homebrew
-
Download and install Homebrew into the local directory:
# No class_name because we autoload this! | |
extends Node | |
const GAME_KEY = "YOUR_KEY" | |
const GAME_VERSION = "0.0.1" | |
const AUTH_URL = "https://api.lootlocker.io/game/v2/session/guest" | |
const LEADERBOARD_URL = "https://api.lootlocker.io/game/YOUR_LEADERBOARD_KEY/highscores/list?count=10" | |
const SET_NAME_URL = "https://api.lootlocker.io/game/player/name" | |
const SUBMIT_SCORE_URL = "https://api.lootlocker.io/game/YOUR_LEADERBOARD_KEY/highscores/submit" |
Shader "Debugger" | |
{ | |
Properties | |
{ | |
[HideInInspector] _texcoord( "", 2D ) = "white" {} | |
} | |
Subshader | |
{ | |
Tags { "RenderType" = "Opaque" } | |
CGPROGRAM |
#if UNITY_EDITOR | |
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
public class FolderStructureSetup | |
{ | |
[MenuItem("Tools/Setup Project Structure")] | |
private static void SetupProjectFolders() | |
{ |
using Unity.Netcode; | |
using UnityEngine; | |
/// <summary> | |
/// Singleton base class for normal MonoBehaviours | |
/// </summary> | |
public class Singleton<T> : MonoBehaviour where T : Component | |
{ | |
public static T Instance { get; private set; } |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.cm commit | |
git config --global alias.s status | |
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.last 'log -1 HEAD' | |
git config --global alias.undo 'reset HEAD~1 --mixed' | |
git config --global alias.done 'push origin HEAD' | |
git config --global alias.unfuck 'reset --hard' | |
git config --global alias.d diff |
type EventMap = Record<string, any>; | |
type EventKey<T extends EventMap> = string & keyof T; | |
type Callback<T> = (params: T) => void; | |
export class EventEmitter<T extends EventMap> { | |
private listeners: { | |
[K in keyof EventMap]?: Array<(p: EventMap[K]) => void>; | |
} = {}; | |
on<K extends EventKey<T>>(key: K, fn: Callback<T[K]>) { |
Inspired by gitmoji, stripped down to an easier to remember and less granular subset. Include these in your commits and PR titles to enhance you communication and mood.
:tada:
first commit:sparkles:
adds a feature:boom:
breaking change:memo:
adds docs:heavy_plus_sign:
adds dependency(s):heavy_minus_sign:
removes dependency(s)Hey folks!
TLDR: Preview the future of React SSR in Rails apps today, give us your beautiful feedback gifts ;)
The Web Foundation team has some new tools we're ready for teams to put it through their paces during hack days. Over the last few weeks we’ve been working away at pushing the boundaries of our support for Rails+React apps, and one the major fruits of this endeavor has been a brand new first-class pattern for Server-Side-Rendering React in Rails applications. We’ve written a handy new guide for getting setup from scratch, a gem with a built-in generator and a ready-to-install embedded app sample application.
As you may expect, though we are confident that this approach is the right choice going forward, this is still early days for the pattern so pop into #web-foundation-tech for support with whatever issues you may have.
We encourage you to try out SSR in your Rails+React hackdays project, but even if you stick with Client-Side-Rendering, you’ll find improved support with the new `sewing-kit
// assuming keypath is string | number array like `['foo', 0, 'bar']` | |
export function set(object, keypath, value) { | |
if (keypath.length === 0) { | |
return value; | |
} | |
const segments = keypath.slice(0, -1); | |
const finalSegment = keypath.slice(-1)[0]; | |
const leaf = segments.reduce((node, key) => { |