- CSS Sprites - http://css-tricks.com/css-sprites/
- Put CSS at the top of your page
- Reduce number of HTTP requests
- Use a CDN
- Expires/cache-control header
- Specify character set UTF-8 meta tag
- Minify HTML, CSS, and JS (Grunt!) - https://github.com/gruntjs/grunt-contrib-uglify, https://github.com/gruntjs/grunt-contrib-cssmin, and https://github.com/gruntjs/grunt-contrib-htmlmin
- Concatenate CSS and JS (Grunt!) - https://github.com/gruntjs/grunt-contrib-concat
- Enable GZip compression - http://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/
- Use efficient CSS selectors (mainly, don't use too many) - http://csswizardry.com/2011/09/writing-efficient-css-selectors/
Another big ol' list of React resources
Tutorials
- https://medium.com/@firasd/quick-start-tutorial-using-redux-in-react-apps-89b142d6c5c1
- https://github.com/firasd/react-redux-tutorial
- https://github.com/reactjs/react-redux
- http://www.youhavetolearncomputers.com/blog/2015/9/15/a-conceptual-overview-of-redux-or-how-i-fell-in-love-with-a-javascript-state-container
React redux project structure
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NOTE duplicate id 1545839157538981467 | |
https://api-staging.realmassive.com/leases?sort=-updated&page[limit]=10&page[offset]=10 | |
{ | |
"meta":{ | |
"count":125317 | |
}, | |
"data":[ | |
{ | |
"relationships":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var path = require('path'); | |
var recursive = require('recursive-readdir'); | |
var argv = require('minimist')(process.argv.slice(2)); | |
var iifepath = path.resolve(process.cwd(), argv.path); | |
function isIIFEStart (string) { | |
// whatever you don't know my life | |
return string === '(function () {' || |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Author: SuperPaintman <SuperPaintmanDeveloper@gmail.com> | |
# | |
### | |
# Constants | |
### | |
RETVAL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var categories = [ | |
{ | |
id: 0, | |
name: 'Shoes', | |
imageUrl: 'alkfaekfja0-43i' | |
}, | |
{ | |
id: 1, | |
name: 'Clothing', | |
imageUrl: 'someshit' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Node.js proxy server for CORS requests with single page, no-backend apps. | |
// | |
// Instructions: | |
// 1) Place file into your app directory | |
// 2a) If you don't have a package.json file in this directory, run "npm init" first | |
// 2b) Run "npm install --save express request query-string" | |
// 3) Run server with "node server.js" | |
// 4) Configure Express to use whatever folder you want to serve your site out of. | |
// By default, this will run out of whatever folder you have your server.js in, | |
// but you shouldn't do this since it'll make everything in this folder accessible, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This gist shows how you can inject other functions/variables | |
* into a function only by name. I imagine this is probably something | |
* like how AngularJS 1.6 does it, but Angular relies on an internal | |
* list of registered modules instead of just whatever's floating | |
* around the namespace, which is dangerous. | |
**/ | |
// Things to inject | |
function LoggerOne () { |
NewerOlder