Skip to content

Instantly share code, notes, and snippets.

@jose8a
jose8a / FED Toolchain setup.md
Last active September 14, 2019 19:01
Setting up project template toolchain w/NPM and grunt

HTML5 Boilerplate Template

  1. Begin by using HTML5 Boilerplate as a starter project template,
  • download the template locall
  • add bash alias to copy that folder when starting a new project
  • e.g. $> 'html5-new PROJECTNAME' will create a folder named PROJECTNAME and will copy the contents of html5boilerplate into PROJECTNAME

Frontend Toolchain Setup

Need NodeJS, npm, grunt

  1. Then add the Frontend Toolchain using NPM and Grunt.
// Note that the Car constructor class contains
// an object property (.methods) even though it
// is a function. But, remember, in JS, everything
// is basically an object ... even functions
var Car = function(loc) {
var obj = {loc: loc};
// Extend: Popular JS method (not built-in) that adds/copies
// methods from a 'template' object to the newly created
// object. UnderscoreJS is popular lib that has an example
@jose8a
jose8a / ResponsiveImages.md
Last active August 29, 2015 14:20
ResponsiveDesignNotes - ud893

Image size: Total bits = pixels * bits/pixel

To improve performance:

  • need to keep images as small as possible (less pixels) -AND-
  • compression as HIGH as possible (bits/pixel)
  • therefore, (less pixels) * (better compression) ==> LESS BYTES

For pictures:

  • don't assume window-size === screen-size
@jose8a
jose8a / MergeSort
Created May 4, 2015 22:32
InterviewProblem
//
@jose8a
jose8a / JS-Execution
Last active January 2, 2020 00:36
JS Execution Context, Closures, This, Execution Order, Objects
##### Client-side Javascript Execution Order
http://javascript.about.com/od/hintsandtips/a/exeorder.htm
##### Phillip Roberts - What the heck is the Event Loop Anyways?
https://www.youtube.com/watch?v=8aGhZQkoFbQ
##### Javascript and the Browser - Under the Hood (video)
https://www.youtube.com/watch?v=dibzLw4wPms
http://esprima.org/demo/parse.html#
http://int3.github.io/metajs/
@jose8a
jose8a / ECMA-262-5-Detailed
Created April 20, 2015 07:57
ECMA-262-5 in detail
Ch0 - Introduction
http://dmitrysoshnikov.com/ecmascript/es5-chapter-0-introduction/
Ch1 - Properties and Property Descriptors
http://dmitrysoshnikov.com/ecmascript/es5-chapter-1-properties-and-property-descriptors/
Ch2 - Strict Mode
http://dmitrysoshnikov.com/ecmascript/es5-chapter-2-strict-mode/
Ch3.1 - Lexical Environments: Common Theory
@jose8a
jose8a / ECMA-262-3-Detailed
Created April 20, 2015 07:47
ECMA-262-3 in detail
Javascript - The Core
http://dmitrysoshnikov.com/ecmascript/javascript-the-core/
Ch1 - Execution Contexts - background
http://dmitrysoshnikov.com/ecmascript/chapter-1-execution-contexts/
Ch2 - Variable Object
http://dmitrysoshnikov.com/ecmascript/chapter-2-variable-object/
Ch3 - This

Brief notes on Meteor for CS 294-101. Many of the key architectural ideas in Meteor are described at https://www.meteor.com/projects.

  1. BSD as example of great system design. Application primitives: processes run by a scheduler, sockets, sys calls, virtual memory, mbufs. What makes something a platform. Unix vs Multics.

  2. History of application architectures. Mainframes (e.g. IBM 360 / 3270), client-server (e.g. Win32), web (e.g. LAMP), cloud-client. Oscillation of where the software runs. Thin vs thick clients, data vs presentation on the wire. Changes driven by massive forces (cheap CPUs, ubiquitous internet, mobile). New architecture for each era.

  3. What it takes to make modern UI/UX. Mobile. Live updating. Collaboration. No refresh button. All drive the need for “realtime” or “reactive” system. Very different from HTTP era.

  4. Four questions: 1 — how do we move data around; 2 — where does it come from; 3 — where do we put it; 4 — how do we use it?

@jose8a
jose8a / RailsTestingSetupGuide
Last active August 29, 2015 14:18
Guide for setting up TDD, BDD, or Unit testing in a rails app ... primarily for setting up tests with Rails App Template
##Resources
https://semaphoreci.com/community/tutorials/setting-up-the-bdd-stack-on-a-new-rails-4-application
https://robots.thoughtbot.com/how-we-test-rails-applications
http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/
## Install Rails and the default gems
####Generate new rails app w/out default test and without default 'bundle'ing
rails new --skip-test-unit --skip-bundle myapp
####Manually install gems locally into per-project bundle
@jose8a
jose8a / basic_rails_template.rb
Last active August 29, 2015 14:18
Basic Rails Template
#####################################################################################################################
##### Rails Template adapted from:
##### https://damirsvrtan.github.io/blog/2014/11/26/automate-generating-new-rails-applications/
#####
#####################################################################################################################
#####################################################################################################################
##### Create a bin/setup file so new developers can start right away by executing just one command
##### Move this part once Rails 4.2.0 comes out, b/c the bin/setup script will be in
##### new Rails projects by default.