<%* // load dataview and statblock APIs const dv = this.app.plugins.plugins["dataview"].api; const bestiary = FantasyStatblocks.getBestiary(); // convert array of creatures to dataview array const creaturesAsDvArray = dv.array(Array.from(bestiary.values())); // replace array objects with creature name property let creaturesArray = creaturesAsDvArray.name; // present array as suggester (esc to cancel) let creature = await tp.system.suggester((name) => name, creaturesArray, true, "", 10);
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate rvm | |
$ rvm use default | |
# Install lunchy if not already installed | |
$ gem install lunchy | |
# Make a plist file | |
$ touch ~/Library/LaunchAgents/org.yourusername.email-mom.plist | |
# Open your plist file and copy the text from below |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apps = {} | |
apps.launchers = { | |
{ | |
name="Home - Coding", | |
description="Launch apps for coding.", | |
apps={ | |
"Sublime Text", | |
"iTerm", | |
"Dash" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg text { | |
-webkit-user-select: none; | |
-moz-user-select: none; | |
-ms-user-select: none; | |
user-select: none; | |
} | |
svg text::selection { | |
background: none; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# where 4000 is the port number | |
$ lsof -wni tcp:4000 | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
ruby 7362 rymo 14u IPv4 0xc512a9985f0651ed 0t0 TCP *:terabase (LISTEN) | |
# where 7362 is the PID of the process running on port 4000 | |
$ kill -9 7362 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Taken from Stack Overflow answer http://stackoverflow.com/a/2436623/4093021 | |
import re | |
# items = ['[1] rymoio [rymoio 7s] foo bar', '[2] baz [rymoio 2d] hello world'] | |
# assign matches to callable group parameters | |
regex = r"(?P<who>.*\[.*\]\s)(?P<what>.*)" | |
# bound method outside of the listcomp optimization |
$=dv.span(dv.current())
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Heroku Django Commands # | |
# ---------------------- # | |
# Push local git changes to heroku | |
git push heroku master | |
# Login to heroku via toolbelt | |
heroku login | |
# View heroku processes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credit: https://davidwells.io/snippets/regex-match-markdown-links | |
/* Match only links that are fully qualified with https */ | |
var regex = /^\[([\w\s\d]+)\]\((https?:\/\/[\w\d./?=#]+)\)$/; | |
var string = "[View the analytics docs](https://getanalytics.io/)"; | |
var myMatch = string.match(regex); | |
console.log(myMatch); | |
/* ["[View the analytics docs](https://getanalytics.io/)", "View the analytics docs", "https://getanalytics.io/", index: 0, input: "[View the analytics docs](https://getanalytics.io/)", groups: undefined] */ |
NewerOlder