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 / README-badges.md
Last active March 27, 2024 16:57
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@tterb
tterb / blacklist.exact.json
Last active October 23, 2023 02:55
PiHole blacklist
/**
* Supplementary blacklist for PiHole
* Improves coverage on https://d3ward.github.io/toolz/adblock.html
**/
[
{
"id": 3,
"type": 1,
"domain": "adtech.yahooinc.com",
@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

@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 / 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 / Gulpfile-pt8.js
Created December 20, 2019 08:00
Gulpfile clean
// Delete CSS
gulp.task('clean:styles', function(callback) {
del([paths.jekyllCssFiles + 'main.css',
paths.siteCssFiles + 'main.css',
'_includes/critical.css'
]);
callback();
});
// Delete processed JS
@tterb
tterb / Gulpfile-pt4.js
Last active September 25, 2020 17:39
Gulpfile scripts
// Concatenate and uglify global JS files and output the result to the
// appropriate location
gulp.task('build:scripts:global', function() {
return gulp.src([
paths.jsFiles + '/lib' + paths.jsPattern,
paths.jsFiles + '/*.js'
])
.pipe(concat('main.js'))
.pipe(uglify())
.pipe(gulp.dest(paths.jekyllJsFiles))
@tterb
tterb / Gulpfile-pt3.js
Created December 20, 2019 07:16
Gulpfile critical
// Create and process critical CSS file to be included in head
gulp.task('build:styles:critical', function() {
return sass(paths.sassFiles + '/critical.scss', {
style: 'compressed',
trace: true,
loadPath: [paths.sassFiles]
}).pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }), cssnano()]))
.pipe(gulp.dest('_includes'))
.on('error', gutil.log);
});
@tterb
tterb / Gulpfile-pt2.js
Created December 20, 2019 07:12
Gulpfile stylesheets
// Process styles, add vendor-prefixes, minify, then
// output the file to the appropriate location
gulp.task('build:styles:main', () => {
return sass(paths.sassFiles + '/main.scss', {
style: 'compressed',
trace: true,
loadPath: [paths.sassFiles]
}).pipe(postcss([autoprefixer({ browsers: ['last 2 versions']}), cssnano()]))
.pipe(gulp.dest(paths.jekyllCssFiles))
.pipe(gulp.dest(paths.siteCssFiles))