Skip to content

Instantly share code, notes, and snippets.

View tterb's full-sized avatar
Building stuff

Brett Stevenson tterb

Building stuff
View GitHub Profile
@tterb
tterb / Auto nvm
Created July 25, 2019 17:45
Automatically switches Node versions when you `cd` into a directory with a `.nvmrc` file
find-up () {
path=$(pwd)
while [[ "$path" != "" && ! -e "$path/$1" ]]; do
path=${path%/*}
done
echo "$path"
}
cdnvm(){
cd "$@";
import { Component, OnInit } from '@angular/core';
import {APIService} from '../api.service';
import {BarHorizontalStackedComponent, NgxChartsModule} from '@swimlane/ngx-charts';
import {PieSeriesComponent} from "@swimlane/ngx-charts";
import {PieChartComponent} from "@swimlane/ngx-charts";
import {calculateViewDimensions, ColorHelper, ViewDimensions } from '@swimlane/ngx-charts';
import {scaleBand, scaleLinear, scalePoint, scaleTime} from 'd3-scale';
import {area, curveLinear, line} from 'd3-shape';
import { BaseChartComponent } from '@swimlane/ngx-charts';
import {forEach} from '@angular/router/src/utils/collection';
@tterb
tterb / styles.less
Created March 19, 2019 21:02
A styles.less for using a combination of Operator Mono italics and FiraCode ligatures in Atom
atom-text-editor {
font-family: 'Operator Mono', 'FiraCode', monospace !important;
font-size: 13.5px;
font-weight: 500;
font-style: normal;
letter-spacing: 0.0175em;
line-height: 1.6;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
&.editor .syntax--string.syntax--quoted,
@tterb
tterb / .bash_profile
Created March 19, 2019 04:39
Bash aliases and prompt
# ~/.bash_profile
[[ -s ~/.bashrc ]] && source ~/.bashrc
export CLICOLOR=1
export LSCOLORS=gxBxhxDxdxhxhxhxhxcxbx
export TERM=xterm-256color
alias lc='colorls'
alias ls='ls -GFh'
@tterb
tterb / tterb.iterm2.plist
Created March 19, 2019 04:07
iTerm2 Settings
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AllowClipboardAccess</key>
<true/>
<key>AlternateMouseScroll</key>
<true/>
<key>AppleAntiAliasingThreshold</key>
<integer>1</integer>
@tterb
tterb / Gulpfile.js
Last active March 11, 2022 13:15
An updated gulpfile for tterb.github.io
// Gulpfile.js
const autoprefixer = require('autoprefixer');
const browserSync = require('browser-sync').create();
const concat = require('gulp-concat');
const cssnano = require('cssnano');
const del = require('del');
const gulp = require('gulp');
const gutil = require('gulp-util');
const imagemin = require('gulp-imagemin');
@tterb
tterb / Monokai-Pro.scss
Last active December 28, 2022 14:03
Monokai Pro-inspired syntax-highlighting for Rouge
/**
* Syntax highlighting styles
*/
$syntax-hue: 270;
$syntax-saturation: 4%;
$syntax-brightness: 15%;
$base: hsl($syntax-hue, $syntax-saturation, $syntax-brightness);
$text: hsl($syntax-hue, 9%, 87%);
@tterb
tterb / userChrome.css
Created January 31, 2018 05:21
A monokai-pro inspired theme for Firefox devtools
:root.theme-dark {
/* --theme-body-background: var(--grey-80); */
--theme-body-background: #2c292e !important;
--theme-body-background: hsl(270,4%,17%) !important;
--theme-sidebar-background: #202020 !important;
--theme-contrast-background: #efb35b !important;
/* Toolbar */
--theme-tab-toolbar-background: #202020 !important;
--theme-toolbar-background: #202020 !important;
@tterb
tterb / README-badges.md
Last active April 16, 2024 03:21
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@tterb
tterb / markdown-github-buttons.md
Last active January 1, 2023 00:58
Add github buttons to your README.md

Watch on GitHub Star on GitHub Tweet