Skip to content

Instantly share code, notes, and snippets.

View taylor-jones's full-sized avatar

Taylor Jones taylor-jones

View GitHub Profile
@taylor-jones
taylor-jones / ansi_color.cc
Created November 25, 2020 06:49
Apply ansi coloring to a string in C++
#include "ansi_color.h"
/**
* @name inColor
*
* @brief returns a string, ansi-formatted to be displayed in a particular
* color & style in the console.
*
* @param content - string content to wrap in ansi formatting
* @param foreground - text foreground color (default: kAnsiColorDefault)
@taylor-jones
taylor-jones / add.svg
Created August 17, 2020 01:58
Generic Icons
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taylor-jones
taylor-jones / glossary.schema.yaml
Created August 14, 2020 19:17
YAML Glossary Item Schema
additionalProperties: true
default: {}
description: This is the schema for an individual glossary item
examples:
- acronym: FOO
description: foo
links:
- link: https://foo.com
title: foo
see:
@taylor-jones
taylor-jones / uncrustify.cfg
Created August 3, 2020 06:20
Uncrustify Config
# Uncrustify 0.61
#
# uncrustify config file
#
#newlines { Auto, LF, CR, CRLF }
# The type of line endings
input_tab_size = 4
# The original size of tabs in the input
@taylor-jones
taylor-jones / symlink_update.sh
Created January 22, 2020 05:27
Update all symlinks in a given directory
@taylor-jones
taylor-jones / reveal.py
Last active January 19, 2020 17:57
Displays all the attribute information about a Python object
#!/usr/bin/env python3
class Colors:
CYAN = '\033[96m'
MAGENTA = '\033[95m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
RESET = '\033[0m'
@taylor-jones
taylor-jones / vs_curl.py
Created September 22, 2019 19:47
Download the latest versions of all installed VS Code extensions w/ cURL
"""
Download the latest versions of all installed VSCode extensions with cURL.
TODO: Add option to automatically install all the downloaded extensions.
TODO: Add option to provide any list of extensions, not just the installed ones.
TODO: Update to allow for specifying extension version (but default to latest version).
TODO: Update to check for directory existence (and make one if it doesn't exist).
"""
import os
@taylor-jones
taylor-jones / HtmlComment.jsx
Last active February 19, 2019 19:22 — forked from alexeychikk/ReactComment.jsx
Simple React HTML comment
/* eslint-disable react/no-find-dom-node */
import React, { PureComponent } from 'react';
import ReactDOM from 'react-dom';
import PropTypes from 'prop-types';
class HtmlComment extends PureComponent {
componentDidMount() {
const node = ReactDOM.findDOMNode(this);
ReactDOM.unmountComponentAtNode(node);
@taylor-jones
taylor-jones / capslove2.json
Last active September 12, 2018 19:11
Capslove Karabiner Config
{
"title": "Capslove V2",
"rules": [{
"description": "Capslove Base Home/End",
"manipulators": [{
"type": "basic",
"from": {
"key_code": "caps_lock",
"modifiers": {
"mandatory": [
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->