Skip to content

Instantly share code, notes, and snippets.

View mulholo's full-sized avatar
🙂

James Mulholland mulholo

🙂
View GitHub Profile
@mulholo
mulholo / .bash_aliases
Created January 18, 2024 16:16
Aliases for GitHub CoPilot CLI
# While fantastic, the suggestion functionality on the GitHub CoPilot CLI can be awkward to use due to long command names.
# Here are my suggested aliases for making it much quicker to work with.
# Usage: ?? [natural language instruction for the bash command you want to run]
# Example: ?? "print hello world to the console" -> Suggests 'echo "hello world"'
alias '??'="gh copilot suggest -t shell"
# Usage: git? [natural language instruction for the git command you want to run]
alias 'git?'="gh copilot suggest -t git"
@mulholo
mulholo / vscode-config.jsonc
Last active March 25, 2022 01:45
Calm and Zen VSCode config
{
// JavaScript/TypeScript
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
@mulholo
mulholo / SketchSystems.spec
Last active October 28, 2021 10:19
My Awesome Sketch
My Awesome Sketch
Minimal
drag far right -> Full
expand -> Full
# screen expand -> Full ??
Full
drag left -> Full
drag right -> Full
drag far left -> Minimal
minimise -> Minimal
timer
idle
START -> work
work
TIME_UP -> break
STOP -> idle
break
TIME_UP -> work
STOP -> idle
@mulholo
mulholo / machine.js
Created March 18, 2021 10:38
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@mulholo
mulholo / solarized-dark-roam.css
Created March 13, 2021 21:44
Solarized Dark Roam Theme
/*
Custom roam theme using the Solarized Dark colour theme
https://en.wikipedia.org/wiki/Solarized_(color_scheme)
Credit to Felix Jamestin for the base of this theme:
https://www.felixjamestin.com/post/introducing-mono-a-themeset-for-roam-research
See https://roamresearch.com/#/app/help/page/fJRcVITNY for general Roam theming guidelines
Editing
import sys
!{sys.executable} -m pip install numpy
# Source: https://jakevdp.github.io/blog/2017/12/05/installing-python-packages-from-jupyter/
@mulholo
mulholo / async-js-explainer.js
Created September 25, 2020 16:50
Understanding async/await, try/catch, errors and Promises in JavaScript.
/*
I was confused about asynchronous errors in JavaScript and
React. This whole area is quite confusing so you may be too.
For example, how many of these questions can you confidently
answer?
- Imagine you have a function that throws an error that is
wrapped inside a try/catch. How will this function behave
differently if it is a) synchronous, b) asynchronous?
jest.spyOn(window.navigator, 'language', 'get').mockReturnValue('it');
@mulholo
mulholo / SketchSystems.spec
Created August 18, 2020 15:11
IsUserNewOrOld?*
IsUserNewOrOld?*
new? -> WhichBucketNew?
old? -> WhichBucketOld?
WhichBucketOld?
hasLabsHoldback? -> AlphaA
hasLabsNonHoldback? -> AlphaB
noLabsHoldback? -> Holdback
noLabsNonHoldback? -> NonHoldback