Skip to content

Instantly share code, notes, and snippets.

Avatar
🤖

Bob Chatman BobGneu

🤖
View GitHub Profile
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@BobGneu
BobGneu / LSPDFRDemoPlugin.cs
Created Jan 30, 2019
LSPDFR Plugin - Initial Plugin
View LSPDFRDemoPlugin.cs
namespace LSPDFRDemo
{
using LSPD_First_Response.Mod.API;
using Rage;
public class LSPDFRDemoPlugin : Plugin
{
public override void Initialize()
{
Game.DisplaySubtitle("Initialize");
@BobGneu
BobGneu / HelloWorld.cs
Last active Jan 27, 2019
RPH Plugin - Hello World Example
View HelloWorld.cs
[assembly: Rage.Attributes.Plugin("RPHDemo", Description = "This is a demo plugin", Author = "Bob Chatman - @Bob@mastodon.gamedev.place")]
namespace RPHDemo
{
using Rage;
public class HelloWorld
{
public static void Main()
{
Game.DisplaySubtitle("Hello World!");
@BobGneu
BobGneu / HelloWorld.cs
Last active Jan 27, 2019
RPH Plugin - Including Our Entry Point
View HelloWorld.cs
[assembly: Rage.Attributes.Plugin("RPHDemo", Description = "This is a demo plugin", Author = "Bob Chatman - @Bob@mastodon.gamedev.place")]
namespace RPHDemo
{
public class HelloWorld
{
public static void Main()
{
}
}
}
@BobGneu
BobGneu / HelloWorld.cs
Last active Jan 27, 2019
RPH Plugin - Plugin Attribute - 1
View HelloWorld.cs
[assembly: Rage.Attributes.Plugin("RPHDemo", Description = "This is a demo plugin", Author = "Bob Chatman - @Bob@mastodon.gamedev.place")]
namespace RPHDemo
{
public class HelloWorld
{
}
}
@BobGneu
BobGneu / Other odd cases!.js
Last active Dec 10, 2018
Wrangling Input within TS - Example 3
View Other odd cases!.js
(() => {
"use strict";
let instance = new TSWrangle(42);
console.log(instance.Name); // Name: 42
})();
// OR, given 42 has no length parameter
@BobGneu
BobGneu / entrypoint.js
Last active Dec 10, 2018
Wrangling Input within TS - Example 2
View entrypoint.js
(() => {
"use strict";
let instance = new TSWrangle("Bill");
console.log(instance.Name);
})();
@BobGneu
BobGneu / Example.ts
Last active Dec 6, 2018
Wrangling Input within TS - Example 1
View Example.ts
"use strict";
export class TSWrangle {
private name!: string;
public get Name() {
return this.name;
}
public set Name(value: string) {
View Rust Documentation - Hiding your tests within your examples
//! ```rust
//! # use documentation_test::meaning_of_life;
//! fn it_works() {
//! assert_eq!(42, meaning_of_life(4));
//! }
//!
//! # it_works();
//! ```
View Rust Documentation - Testing Documentation Code Examples
//! ## Documentation Example
//!
//! This is a lot of great documentation, you ought to read and maintain this.
//!
//! Somehow i think, you are going to not do that.
//!
//! ```rust
//! use documentation_test::meaning_of_life;
//!
//! fn it_works() {