Skip to content

Instantly share code, notes, and snippets.

@romanarellano
romanarellano / _.md
Last active August 29, 2015 14:17
from video 3 little circles
@romanarellano
romanarellano / _.md
Last active August 29, 2015 14:17
circular balls
/**
* This function logs to the console each element in an Array of Strings.
* This function accepts an Array of Strings as an argument and returns nothing.
*
* printArray(['Such', 'Hawks', 'Such', 'Hounds']);
*
* Will display in the console as:
* Such
* Hawks
* Such
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

MEH to MVC

Diagrams

mvc

mvc

The Controller

#tl;dr

git remote add [maintainer's name] [paste URL here]
git branch --track [maintainer's name]_[branch] [remote name from step 2]/[branch you want to track]
git checkout [maintainer's name]_[branch]
git pull
git checkout master
git merge [maintainer's name]_[branch]

ToDo Layouts

Here are some pretty layouts for the To Do List. These are optional, you can use your own styles if you wish.

List View

1

List View Hover States

2

@romanarellano
romanarellano / app.js
Last active August 29, 2015 14:16 — forked from theRemix/app.js
// in your express app, add this module
var methodOverride = require('method-override')
// then add this middleware AFTER bodyParser
app.use(methodOverride('_method'))
// you should now be able to handle that DELETE route
app.delete('/todos/:id', function(){
// handle the action here
});

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).