Skip to content

Instantly share code, notes, and snippets.

View chrisdothtml's full-sized avatar
🙂

Chris Deacy chrisdothtml

🙂
View GitHub Profile
@chrisdothtml
chrisdothtml / get-issue-refs.js
Created August 14, 2019 19:07
Get fixed issue references from GitHub pull request body
/*
* Get fixed issue references from GitHub pull request body
*/
function getIssueRefs(pullRequestBody, defaultRepoName) {
// ref: https://help.github.com/en/articles/closing-issues-using-keywords
const keywords = 'close|closed|closes|fix|fixed|fixes|resolve|resolved|resolves';
// ref: https://help.github.com/en/articles/autolinked-references-and-urls#issues-and-pull-requests
const refTypes = [
// #000
'#',
@chrisdothtml
chrisdothtml / octave.md
Created August 25, 2019 02:24 — forked from obstschale/octave.md
An Octave introduction cheat sheet.

Octave CheatSheet

GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)

Basics

  • not equal ~=
  • logical AND &&
#!/bin/bash
###
# Usage example:
#
# . "path/to/discoverable_bash.sh"
#
# import { indent_lines } from './_utils.sh'
# call '../bins/start.sh' "foo"
###
@chrisdothtml
chrisdothtml / JupyterPageFollower.user.js
Last active May 31, 2023 18:24
jupyter notebook page follower
// ==UserScript==
// @name jupyter notebook page follow
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Add 'page follow' feature to jupyter notebook pages
// @author Chris Deacy
// @match http*://*/notebook*/*
// @downloadURl https://gist.github.com/chrisdothtml/51c2b5ca2dc9c498fe27d0d464b47801/raw/JupyterPageFollower.user.js
// @updateURl https://gist.github.com/chrisdothtml/51c2b5ca2dc9c498fe27d0d464b47801/raw/JupyterPageFollower.user.js
// @grant none
@chrisdothtml
chrisdothtml / getFnCaller.js
Last active February 19, 2025 00:06
A JavaScript utility that can be used to determine what function and file your function was called from
/**
* A JavaScript utility that can be used to determine what function
* and file your function was called from. Useful for debugging
* large/complex codebases.
*
* @returns {{
* fnName: string | void;
* filePath: string;
* lineNumber: number;
* columnNumber: number;