Skip to content

Instantly share code, notes, and snippets.

@vanslambrouckd
vanslambrouckd / 0_reuse_code.js
Last active August 29, 2015 14:08
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@vanslambrouckd
vanslambrouckd / javascript_resources.md
Last active August 29, 2015 14:08 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
[Emmet cheatsheet](http://docs.emmet.io/cheat-sheet/)
##html
- press tab after line
- div>ul>li
- ! => (=html5 template)
- script:src
- style =>
- a =>
- a:mail =>
- img =>
zsh (oh-my-zsh)
antigen (manage shell scripts)
solarized theme
http://www.bash2zsh.com/zsh_refcard/refcard.pdf
http://grml.org/zsh/zsh-lovers.html
from: http://stackoverflow.com/questions/9329446/how-to-do-for-each-over-an-array-in-javascript
For Actual Arrays
(See "For Array-Like Objects" below for array-like objects.)
You currently have three options and will soon have two more:
Use forEach and related (ES5+)
Use a simple for loop
@vanslambrouckd
vanslambrouckd / gist:75c59d24100e14ae53b9
Created December 19, 2014 08:47
modal region question
https://github.com/vanslambrouckd/marionette_test/blob/master/js/region_modal.js
<div class="ui modal" id="modal-region">
<i class="close icon"></i>
<div class="header">
<%= title %>
</div>
<div class="content">
<div class="ui medium image">
<img src="/images/avatar/large/chris.jpg">
@vanslambrouckd
vanslambrouckd / gist:cfdb2e8cd12822745192
Created December 19, 2014 09:59
marionette.js layout vs region
Regions are areas taht will remain displayed (semi-) permanently as the user navigates (example: nav menu)
Layouts: behave like views, but in addition have areas where you can display subviews.
Layouts are meant to disappear when a user navigates somewhere else and that view is no longer necessary
@vanslambrouckd
vanslambrouckd / gistbook.json
Last active August 29, 2015 14:12
Anonymous Gistbook
{"title":"Anonymous Gistbook","author":"vanslambrouckd","pages":[{"pageName":"","sections":[{"type":"javascript","source":"var test = 'david';\nalert('test');"},{"type":"text","source":"Welcome to Gistbook!"},{"type":"html","source":"<html>\n <body>\n jfdlksqjflkdqsjflqdks\n </body>\n</html>"}]}],"public":true}