Skip to content

Instantly share code, notes, and snippets.

View ericclemmons's full-sized avatar
🏠
Working from home

Eric Clemmons ericclemmons

🏠
Working from home
View GitHub Profile
@ericclemmons
ericclemmons / responsive-badge.html
Created May 28, 2019 04:14
Responsive indicators for TailwindCSS
<link rel="stylesheet" href="https://unpkg.com/tailwindcss@1.0.1/dist/tailwind.min.css">
<!-- Responsive indicators! -->
<div class="fixed top-0 right-0 z-50 bg-pink-500 text-white shadow-md px-2 rounded-bl font-mono">
<span class="sm:hidden">default</span>
<span class="hidden sm:inline md:hidden">sm</span>
<span class="hidden md:inline lg:hidden">md</span>
<span class="hidden lg:inline xl:hidden">lg</span>
<span class="hidden xl:inline">xl</span>
</div>
@ericclemmons
ericclemmons / README.md
Created April 15, 2018 23:36
Hot take on Zach Silveira's Gutenblock Demo!
@ericclemmons
ericclemmons / webpack.config.js
Created November 22, 2016 02:55
Minimal webpack + babel + Node v6 + Chrome
var webpack = require("webpack");
module.exports = {
module: {
loaders: [
{
exclude: /node_modules/,
loader: "babel-loader",
query: {
cacheDirectory: true,
@ericclemmons
ericclemmons / snazzy.itermcolors
Created September 17, 2016 03:18
Port of hyperterm-snazzy to iTerm2
<?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>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.15977835655212402</real>
@ericclemmons
ericclemmons / example.md
Last active October 13, 2025 15:16
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 Summary Goes Here
@ericclemmons
ericclemmons / schools.address.state.js
Created June 12, 2016 04:30
Term for: schools.address.state (Stores the state abbreviation for a school's location)
/**
* Term: schools.address.state
*
* Stores the state abbreviation for a school's location.
*/
module.exports = {
table: 'school', // Entity table in DB
// `?state=tx` is supported (or would throw) here
filter: function(qb, value) {
export default {
...
resolve: {
root: [
path.join(process.cwd(), "lib"),
],
},
...
@ericclemmons
ericclemmons / HappyFactory.js
Created August 27, 2015 02:42
ES6 Classes as Factories
class HappyFactory {
constructor(message) {
return Promise.resolve(`${message} there!`);
}
}
new HappyFactory("Howdy").then(::console.log);
// "Howdy there!"
var _ = require("lodash");
var path = require("path");
var env = process.env.NODE_ENV || "development";
var debug = ["development", "test"].indexOf(env) !== -1;
var defaults = {
cache: debug,
debug: debug,
@ericclemmons
ericclemmons / .eslintrc
Created March 24, 2015 03:52
My latest .eslintrc
{
"ecmaFeatures": {
"arrowFunctions": true,
"binaryLiterals": false,
"blockBindings": true,
"classes": true,
"defaultParams": true,
"destructuring": true,
"forOf": false,
"generators": true,