Skip to content

Instantly share code, notes, and snippets.

View IcodeNet's full-sized avatar
😀

Byron Thanopoulos IcodeNet

😀
View GitHub Profile
@IcodeNet
IcodeNet / IF.jsx
Created July 27, 2019 01:57
IF.jsx
const SaveComponent = (props) => {
return (
<div>
<p>
<input
onChange={props.handleChange}
value={props.text}
/>
</p>
<button onClick={props.handleSave}>
@IcodeNet
IcodeNet / materialUiStyles.js
Created July 5, 2019 09:07 — forked from mbixby/materialUiStyles.js
Extending Material UI styles
import { merge } from 'lodash'
// This module allows us to completely customize all of Material UI's JSS stylesheets
// to define our own theme.
//
// Note that you Material UI's JSS is often tied to application logic and you may
// deviate from the official Material UI spec.
//
// Unlike using the `overrides` feature of jss-theme-reactor, here you have access to
// the original calculated styles and theme. Notably you can do deep merge (lodash.merge)
@IcodeNet
IcodeNet / mock-axios.js
Created July 1, 2019 12:53 — forked from cowboy/mock-axios.js
axios mocking via interceptors
import axios from 'axios'
let mockingEnabled = false
const mocks = {}
export function addMock(url, data) {
mocks[url] = data
}
@IcodeNet
IcodeNet / App.js
Created June 21, 2019 09:54 — forked from shelldandy/App.js
nprogress with react-router in create-react-app
import React from 'react'
import { BrowserRouter as Router, Switch } from 'react-router-dom'
import routes from './routes'
import FancyRoute from './components/tools/FancyRoute'
const App = props =>
<Router>
<Switch>
{routes.map((route, i) =>
<FancyRoute key={i} {...route} />
function AjaxConfig(config) {
// Default values + config
Object.assign(this, {
method: 'POST',
contentType: 'text/plain'
}, config);
// Default values in nested objects
@IcodeNet
IcodeNet / SCSS.md
Created February 11, 2019 10:01 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

@IcodeNet
IcodeNet / SCSS.md
Created February 11, 2019 10:01 — forked from jareware/SCSS.md
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
for /d /r "C:\\dev\Under_here_Recursively" %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"
pause