Skip to content

Instantly share code, notes, and snippets.

View remy's full-sized avatar
🌮
Hack. Learn. Fix. Teach.

Remy Sharp remy

🌮
Hack. Learn. Fix. Teach.
View GitHub Profile
@remy
remy / .eslintrc.json
Created August 3, 2018 10:01
My minimum eslintrc file needed (env: node + es6) - requires global install of eslint modules…
{
"extends": "eslint:recommended",
"env": {
"node": true,
"es6": true
},
"rules": {
"no-console": 0
}
}
@remy
remy / _README.md
Last active July 25, 2018 16:27
User style sheet to put the README in the right place.

README first for github

Using a user style sheet extension, this CSS should give you enough targetting to put the README above the files, putting the important information in the right place.

I use uptight, by the late Chloe Weil, you can use what you want.

example

@remy
remy / config.next.js
Created July 18, 2018 20:40
How I get env values into next.js
require('@remy/envy'); // similar to dotenv, but supports .env.production, .env.local, etc
const webpack = require('webpack');
module.exports = {
webpack: config => {
config.plugins.push(
new webpack.EnvironmentPlugin(
['SHOW_SPEAKER'] // array of indiviudal ENV values I want exposed
)
);
{
"script": "http.js",
"ext": "json",
"ignore": [".git", "node_modules/**/node_modules"],
"watch": "watchPath"
}
// via @github.com/electricg
// remove next.js custom scripts ala https://github.com/zeit/next.js/issues/3155#issuecomment-338708632
import React from 'react';
import { Head } from 'next/document';
export default class MyHead extends Head {
render() {
const { head, styles } = this.context._documentProps;
return (
// pages/index.js
const Page = props => <pre>{JSON.stringify(props, '', 2)}</pre>;
export default Page;
@remy
remy / Custom.css
Last active August 18, 2023 13:27
My user style sheet that override the crap sites push on me.
/* 'eff you, I will select what I want. */
* {
user-select: initial !important;
}
.sg-tabs-panel {
min-height: 20em !important;
}
.refined-github #new_comment_field {
module.exports = {
env: { browser: true },
extends: ['eslint:recommended', 'plugin:compat/recommended'],
};
module.exports = {
env: { browser: true, es6: true, commonjs: true },
extends: ['eslint:recommended', 'plugin:compat/recommended'],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true },
sourceType: 'module',
},
plugins: ['react'],
rules: {
module.exports = {
env: { browser: true, es6: true, commonjs: true },
extends: ['eslint:recommended', 'plugin:compat/recommended'],
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true },
sourceType: 'module',
},
plugins: ['react'],
rules: {