Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthieu Oger solarsailer

View GitHub Profile
@solarsailer
solarsailer / pl-convert.js
Last active May 23, 2020
Create variants for an image (based on https://github.com/tmcw/bespoke)
View pl-convert.js
#!/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 Sep 6, 2019
LVHA order for predictable colors on links
View lvha.css
a {
color: COLOR;
}
a:visited {
color: COLOR; /* Optional, especially on SPA apps. */
}
a:hover {
color: COLOR;
@solarsailer
solarsailer / lvha.css
Created Sep 6, 2019
LVHA order for predictable colors on links
View lvha.css
a {
color: COLOR;
}
a:visited {
color: COLOR; /* Optional, especially on SPA apps. */
}
a:hover {
color: COLOR;
View reset.css
/**
* Reset.
*/
h1,
h2,
h3,
h4,
h5,
h6,
@solarsailer
solarsailer / base.css
Created Sep 6, 2019
Default stylesheet for sane defaults.
View base.css
/**
* 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 Jul 31, 2018
Default global styles for a React app using Styled Components.
View _manifest.js
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 Jul 2, 2018
Lightroom custom metadata panel
View Matthieu Oger.lrtemplate
-- 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" },
View globals.js
import {injectGlobal} from 'styled-components'
injectGlobal`
p {
color: red;
}
`
@solarsailer
solarsailer / README.md
Last active Jul 31, 2017
webpack configuration for Sass, Autoprefixer, CSS, CSS Modules and ES6+
View README.md

Structure

📄 webpack.config.js
📄 package.json
📁 scripts/
  📄 manifest.js
  📄 index.js
📁 stylesheets/
  📄 main.scss
@solarsailer
solarsailer / open_iterm.applescript
Last active Feb 6, 2017
Open current Finder window in iTerm (for Finder toolbar usage)
View open_iterm.applescript
on run
tell application "Finder"
try
set targetPath to (quoted form of POSIX path of (folder of the front window as alias))
on error
set targetPath to "~"
end try
end tell
my openTerminal(targetPath)