Skip to content

Instantly share code, notes, and snippets.

View azz0r's full-sized avatar
🎯
Focusing

Aaron Wuggawoo azz0r

🎯
Focusing
View GitHub Profile

babel-plugin-transform-mui-imports npm

A plugin to make authoring with MUI components efficient, both for humans and bundlers.

Here's why:

@danny-andrews
danny-andrews / component-decorator-example.jsx
Last active December 4, 2017 16:39
React Abstractions: HoC example
const withLuckyNumber = Component => (props) => <Component number={Math.random()} {...props} />;
const UnconnectedApp = ({ number }) => <div>Your number is: {number}!</div>;
const App = withLuckyNumber(UnconnectedApp);
@zackferrofields
zackferrofields / autoScroll.js
Last active February 12, 2018 20:22
Stateless (almost) react scroll to on `componentDidMount`
import { createElement } from 'react';
import { compose } from 'ramda';
import { lifecycle, withProps } from 'recompose';
const enhance = compose(
lifecycle({ componentDidMount() {
this.refs.node.scrollIntoView({block: 'end', behavior: 'smooth'});
} }),
withProps({ ref: 'node' }),
);
@aamnah
aamnah / redux-ajax.js
Created December 8, 2016 13:13
[work-in-progress] Redux + AJAX basics
// Basic AJAX Example
import React, { Component } from 'react'
import { render } from 'react-dom'
import { createStore, applyMiddleware, combineReducers } from 'redux'
import { Provider, connect } from 'react-redux'
import axios from 'axios'
import createLogger from 'redux-logger'
import thunkMiddleware from 'redux-thunk'
const logger = createLogger()
@brennanMKE
brennanMKE / README.md
Created October 4, 2016 16:10
React Native on macOS Sierra

React Native Trouble

Updating to macOS Sierra is causing trouble with React Native due to some of the Node.js and system utilities it uses. Specifically the watch utility fails due to a limit on the number of files which can be opened at a time.

The following command shows the current limit.

launchctl limit maxfiles
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@scvalex
scvalex / counter.html
Last active December 3, 2017 10:47
counter
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Counter</title>
<link rel="stylesheet" href="/r/screen.css" media="screen">
<meta name="description" content="An HTML5 counter">
@mikestone14
mikestone14 / gist:11198630
Created April 23, 2014 00:08
Getting a GoDaddy domain to point to a Heroku app.