Skip to content

Instantly share code, notes, and snippets.

@bplus
bplus / setAttribute
Created March 31, 2020 03:43 — forked from sturtus/setAttribute
Roll20 API script to change an attribute's value to the defined string.
function getAttributeObjects(characterObj,attributeArray) {
// can pass array of attribute strings or a single attribute string along with an associated character
// returns those attributes as an object array or returns false if they do not exist on the passed character.
// get the passed attribute name array from the character object and test if they are defined
if (characterObj != undefined ) {
var attributeObjArray = new Array();
if (!(attributeArray instanceof Array)) {
@bplus
bplus / DCC Helper
Created March 31, 2020 03:42 — forked from sturtus/DCC Helper
DCC Helper for Roll20.net
/*
==========================================
Roll20 Character Sheet Attribute Utilities
==========================================
!stats
!stats Atribute1, Attribute2, ...
!attrib attribute|newValue
!attrib
~~~~~~~
@bplus
bplus / tmuxinator_gen.sh
Created March 15, 2018 16:42 — forked from cobrajs/tmuxinator_gen.sh
Generates a tmuxinator config file for a session. Uses the current session, or takes the session name as an argument.
#!/bin/bash
session_name=
session_pre=
if [[ "$1" ]]; then
session_name="-t $1"
session_pre="$1"
fi
session_path=$(tmux list-panes -t $session_pre:1 -F "#{pane_start_path}")

From zero to microservice with 𝚫 now

The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.

It uses Open Source tools that are widely available, tested and understood:

  • Node.JS
  • NPM
  • Express
@bplus
bplus / ctags.setup
Created August 30, 2017 16:07 — forked from nazgob/ctags.setup
ctags setup on mac
# you have ctags but it does not work...
$ ctags -R --exclude=.git --exclude=log *
ctags: illegal option -- R
usage: ctags [-BFadtuwvx] [-f tagsfile] file ...
#you need to get new ctags, i recommend homebrew but anything will work
$ brew install ctags
#alias ctags if you used homebrew
$ alias ctags="`brew --prefix`/bin/ctags"
@bplus
bplus / background.js
Created July 3, 2017 06:02 — forked from omarstreak/background.js
Chrome API Extension
//oauth2 auth
chrome.identity.getAuthToken(
{'interactive': true},
function(){
//load Google's javascript client libraries
window.gapi_onload = authorize;
loadScript('https://apis.google.com/js/client.js');
}
);