Skip to content

Instantly share code, notes, and snippets.

View solarsailer's full-sized avatar

Matthieu Oger solarsailer

View GitHub Profile
@solarsailer
solarsailer / utils.js
Created June 15, 2022 10:04
Deno Utility Belt
export async function writeFile(path, content) {
await Deno.writeTextFile(path, content);
}
@solarsailer
solarsailer / pl-convert.js
Last active May 23, 2020 22:28
Create variants for an image (based on https://github.com/tmcw/bespoke)
#!/usr/bin/env node
const fs = require('fs')
const sharp = require('sharp')
const prettyBytes = require('pretty-bytes')
// -------------------------------------------------------------
// Script.
//
// Note: for optimal file sizes, export at highest quality
@solarsailer
solarsailer / lvha.css
Created September 6, 2019 18:35
LVHA order for predictable colors on links
a {
color: COLOR;
}
a:visited {
color: COLOR; /* Optional, especially on SPA apps. */
}
a:hover {
color: COLOR;
@solarsailer
solarsailer / lvha.css
Created September 6, 2019 18:35
LVHA order for predictable colors on links
a {
color: COLOR;
}
a:visited {
color: COLOR; /* Optional, especially on SPA apps. */
}
a:hover {
color: COLOR;
@solarsailer
solarsailer / reset.css
Created September 6, 2019 18:31
Minimal reset
/**
* Reset.
*/
h1,
h2,
h3,
h4,
h5,
h6,
@solarsailer
solarsailer / base.css
Created September 6, 2019 18:13
Default stylesheet for sane defaults.
/**
* Box-model:
* 1. Change default box-model to border-box (the better model).
* 2. All elements will inherit from the <html> box-model.
*/
html {
box-sizing: border-box; /* 1 */
}
@solarsailer
solarsailer / _manifest.js
Last active July 31, 2018 14:18
Default global styles for a React app using Styled Components.
import {injectGlobal} from 'styled-components'
import normalize from './normalize'
import base from './base'
import site from './site'
// See: https://github.com/styled-components/styled-components/issues/1109
// -------------------------------------------------------------
// Manifest.
@solarsailer
solarsailer / Matthieu Oger.lrtemplate
Created July 2, 2018 22:34
Lightroom custom metadata panel
-- Copy in "~/Library/Application Support/Adobe/Lightroom/Metadata Field Lists/Matthieu Oger.lrtemplate"
return {
version = 1,
title = "Matthieu Oger",
id = "info.regex.lrmeta.v1.mo",
type = "MetadataFieldList",
items = {
{ formatter = 'com.adobe.captureDate', label="Date" },
{ formatter = 'com.adobe.captureTime', label="Time" },
import {injectGlobal} from 'styled-components'
injectGlobal`
p {
color: red;
}
`
@solarsailer
solarsailer / README.md
Last active July 31, 2017 16:20
webpack configuration for Sass, Autoprefixer, CSS, CSS Modules and ES6+

Structure

📄 webpack.config.js
📄 package.json
📁 scripts/
  📄 manifest.js
  📄 index.js
📁 stylesheets/
 📄 main.scss