vince

Undoing Changes

Undo latest commit using git revert HEAD ``` ~/code/gitfaffing % git log --oneline 481db44 (HEAD -> master) crazy edit of world.txt be880c6 added world.txt and edited hello.txt aa1a9d2 init ~/code/...

Branch

list branches git branch ` create (and checkout) new branch git checkout -b crazy-experiment ` delete branch (after merging) git branch -d crazy-experiment delete branch (not merged but you don...

Cloning an existing repository

  • Updated 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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 3 months 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...