vince

Cloning an existing repository

  • Updated over 2 years ago by vince
Initializing a new Git repo

/Users/Sosie/code/lukeko ruby git init git add . git commit -m "init" Make changes and then ruby git commit -a -m "summary of what changed" If you add a file ruby git add . git commit -a -m "summ...

  • Updated over 2 years ago by vince
Getting Started

Install Fontawesome in Rails 6

% yarn add @fortawesome/fontawesome-free app/assets/stylesheets/application.scss scss @import '@fortawesome/fontawesome-free/scss/fontawesome'; in any view html <i class="fas fa-dragon"></i> ht...

Installing Bootstrap in Rails 6

% yarn add bootstrap jquery popper.js app/config/webpack/environment.js ```javascript const { environment } = require('@rails/webpacker') const webpack = require('webpack') environment.plugins.ap...

Run Heroku Rails apps in production mode locally

Procfile web: bundle exec puma -t 5:5 -p ${PORT:-3000} -e ${RACK_ENV:-development} .env RACK_ENV=production PORT=3000 .gitigore .env % rails assets:precompile % heroku local

  • Updated over 2 years ago by vince
Manage Ruby versions with rbenv

update rbenv ``` $ brew upgrade rbenv ruby-build list all available versions: $ rbenv install -l install a Ruby version: $ rbenv install 2.7.1 ``` set default/global version of ruby ~/.rbenv % ls ...

  • Updated over 2 years ago by vince
Save leaderstats to DataStore

ServerScriptService/PlayerSetup ```lua local DataStoreService = game:GetService("DataStoreService") local playerGold = DataStoreService:GetDataStore("playerGold") local function onPlayerJoin(player...

UserId

The UserId uniquely identifies every user account on Roblox. Unlike Instance.Name of a Player, which may change according the user’s present username, this value will never change for the same acco...

Beginner Video Tutorials

Video tutorials from Blender Guru https://www.youtube.com/playlist?list=PLjEaoINr3zgEq0u2MzVgAaHEBt--xLB6U

  • Updated over 2 years ago by vince
Leaderboards

ServerScriptService/PlayerSetup ```lua local function onPlayerJoin(player) local leaderstats = Instance.new("Folder", player) leaderstats.Name = "leaderstats" local gold = Instance.new("Int...

Data Store

used to save data which should persist between game sessions shared per game essentially a dictionary Each value can be indexed by a unique key which includes the player’s UserId network calls may ...

Lerping

Using a method known as linear interpolation, often referred to as lerp, you can position a CFrame between two points. For instance, the following code positions the redBlock part directly between ...

Pathfinding

find [the closest] path for an NPC to move from point A to point B ```lua local PathfindingService = game:GetService("PathfindingService") -- Variables for the zombie, its humanoid, and destination...

  • Updated over 2 years ago by vince
CFrame

short for Coordinate Frame it is a data type used to rotate and position 3D objects contains global X, Y, and Z coordinates as well as rotation data for each axis contains helpful functions for wor...

Module Scripts

code within module scripts can be used by other scripts makes maintaining code easier since changes only need to be made to one module script ServerStorage/MoneyManager ```ruby local MoneyManager =...

Arrays

An array is a simple list of ordered values -- simply store the values sequentially, separated by commas ```ruby local testArray = {"A string", 3.14159, workspace.Part} print(testArray[2]) ```

  • Updated over 2 years ago by vince
Tables

A table is a Lua data type that can store multiple values and can behave as either an array or a dictionary ruby local table = {} https://developer.roblox.com/en-us/articles/Table https://educatio...

Dictionary

Dictionaries are an extension of arrays. While an array stores an ordered list of items, a dictionary stores a set of key-value pairs. To create a dictionary table, define each key followed by = an...

Tick()

Tick() tells you how much time has passed since 1 Jan 1970 -- you can use it to figure out how much time has passed since a game started etc Workspace/Part/Script ruby local gameStarted = tick() lo...

  • Updated over 2 years ago by vince