Skip to content

Instantly share code, notes, and snippets.

View AndruC's full-sized avatar

Andrew Cousineau AndruC

View GitHub Profile
@AndruC
AndruC / dragonruby.rbi
Last active August 24, 2022 16:28
/Dragonrbuy Game Toolkit rbi
# -- dragonruby engine --
# typed: strict
# source: https://ediathome.github.io/dragon-ruby-documenter/short.html
module Kernel
def tick_count; end
end
class Array
@AndruC
AndruC / roll20.d.ts
Last active February 7, 2022 05:07
Roll20 Typescript Type Definition
/// <reference path="../node_modules/@types/underscore/index.d.ts" />
/**
* Roll20 Typescript Type Declaration file
* @author Andrew Cousineau <andruc@gmail.com>
* @license MIT-0
*/
// API Objects
// https://help.roll20.net/hc/en-us/articles/360037772793-API-Objects
{
"name": "181st Imperial Pilot",
"avatar id": "ie16.jpg",
"set": "Imperial Entanglements",
"id": 16,
"faction": "Imperial",
"rarity": "uncommon",
"cost": 12,
"size": "medium",
"hit points": 20,
@AndruC
AndruC / Roll20 Macros.md
Last active May 10, 2024 06:25
Macros that I use to improve my D&D games

Macro Must-Haves

These are my must-have macros for running games online. I make full use of the compendium, which gives these macros access to common actions and rolls, saving me time.

Remember to add /w gm or @{selected|wtype} to hide sensitive info from your players. WTYPE is an attribute used in the 5th Edition OGL character sheet, a prerequisite for most of these.

Here's what my bar looks like.

Macro Quickbar

Keybase proof

I hereby claim:

  • I am andruc on github.
  • I am andruc (https://keybase.io/andruc) on keybase.
  • I have a public key whose fingerprint is A8D6 BF44 CC94 EF42 E3BF C80F 297B 9B2A E862 1D9A

To claim this, I am signing this object:

@AndruC
AndruC / gist:5265451
Last active December 15, 2015 13:09
friendly_title ie slugify from FuelPHP Core class Inflector
/**
* Converts your text to a URL-friendly title so it can be used in the URL.
* Only works with UTF8 input and and only outputs 7 bit ASCII characters.
*
* @param string the text
* @param string the separator (either - or _)
* @return string the new title
*/
public static function friendly_title($str, $sep = '-', $lowercase = false)
{