Skip to content

Instantly share code, notes, and snippets.

View glennreyes's full-sized avatar
🎵

Glenn Reyes glennreyes

🎵
View GitHub Profile
@glennreyes
glennreyes / ie9-pseudo-td.css
Last active October 19, 2015 14:11
The solution for the IE pseudo text decoration
.email {
text-decoration: none;
}
.email:hover {
text-decoration: underline;
}
.email:before {
content:">>";
@glennreyes
glennreyes / Readme.md
Created May 24, 2016 11:02 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@glennreyes
glennreyes / 150510-notes.md
Created June 2, 2016 18:11
Notes on Progressive Webapps with Nolan Lawson

Progressive Webapps

Application Shell

  • Progressive rendering
    • Don't show a blank screen
  • Progressive enhancement

Strategies

  • Server-side HTML
  • React
@glennreyes
glennreyes / webpack.config.js
Created September 14, 2016 09:17
Custom props & media config in webpack
const customMedia = require('./postcss/customMedia');
const customProperties = require('./postcss/customProperties');
module.exports = {
...
plugins: [
postcss: () => [
postcss: () => [
cssnext({ features: { customMedia, customProperties } }),
],
@glennreyes
glennreyes / HotErrorClient.jsx
Created October 22, 2016 10:16
Example using redbox-react
/* @flow */
/* eslint-disable global-require, no-console */
import React from 'react';
import { render } from 'react-dom';
import Redbox from 'redbox-react';
const clearConsole = () => {
if (typeof console.clear === 'function') {

Keybase proof

I hereby claim:

  • I am glennreyes on github.
  • I am glennreyes (https://keybase.io/glennreyes) on keybase.
  • I have a public key whose fingerprint is B921 FD09 9BB6 AB54 93ED D30E E798 7280 C8EF E5AB

To claim this, I am signing this object:

@glennreyes
glennreyes / lerna-now.md
Created March 11, 2017 18:58
Deployment script for a single lerna packge using now.sh
lerna exec --concurrency 1 --scope package -- now -t $ZEIT_TOKEN

Leveraging code-splitting in React apps

Why consider code split?

  • Imagine regular 3G connection on mobile devices
  • Seconds until first meaningful paint?
  • Mobile trend

How?

  • Explain import();
  • Example import();
@glennreyes
glennreyes / create-favicon.sh
Created August 17, 2017 14:45
Creates a favicon.ico with ImageMagick
# Creates a favicon.ico with ImageMagick
convert favicon.png -define icon:auto-resize=256,192,128,64,48,32,16 favicon.ico