Skip to content

Instantly share code, notes, and snippets.

@rependa
rependa / doctype.html
Created February 5, 2013 19:53
HTML: Starting template
<!doctype html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="style.css"/>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
</body>
@rependa
rependa / isEnFr
Last active December 12, 2015 05:48
js: Checks to see if there is a /fr/ folder in the url. Returns 'fr' or 'en'.
function isEnFr(){
var lang = (top.location.href.toLowerCase().indexOf("/fr/")>-1)? "fr":"en";
return lang;
}
/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
@rependa
rependa / less-media-query.less
Last active September 23, 2015 20:18
Fancy Media Queries with some Less Magic
/*
http://stackoverflow.com/questions/15837808/fancy-media-queries-with-some-less-magic
setup
*/
@xs-min: 480px;
@sm-min: 768px;
@md-min: 992px;
@rependa
rependa / notes.md
Created October 9, 2015 17:53 — forked from scottjehl/notes.md
Notes from Wes Bos's talk on web tooling

Notes from @wesbos's talk:

Our frontend workflow is changing quickly and for good reasons. Tooling for tooling sake is a waste, but don't overlook the utility of modern dev tooling workflows - these are great, useful tools that are letting us improve our workflows in standards-based, forward-looking ways.

Trend: Frontend developers are moving to using package managers (npm) for client-side code (CSS and JS), much like we have been for managing our build tooling itself. I can attest to this being hugely helpful at Filament Group on client-side code, especially now that so many of our projects are on npm (https://www.npmjs.com/~filamentgroup ).

Yay, another talk that recommends loadCSS for performance. Nice to hear :)

Gulp tasks to use:

@rependa
rependa / XmVGpJ.markdown
Last active October 22, 2015 16:02
XmVGpJ

AngularJS Directives

The ng-app directive tells AngularJS that the <div> element is the "owner" of an AngularJS application.

The ng-model Directive

The ng-model directive binds the value of HTML controls (input, select, textarea) to application data.

The ng-model directive can also:

@rependa
rependa / bVaZQZ.markdown
Last active October 21, 2015 15:52
bVaZQZ

AngularJS Expressions

AngularJS expressions are written inside double braces: {{ expression }}.

AngularJS expressions bind AngularJS data to HTML the same way as the ng-bind directive.

A Pen by Matt Rependa on CodePen.

License.

@rependa
rependa / index.html
Last active October 21, 2015 18:51
qOpGeO
<div ng-app="myApp" ng-controller="myCtrl">
First Name: <input type="text" ng-model="firstName"><br>
Last Name: <input type="text" ng-model="lastName"><br>
<br>
Full Name: {{firstName + " " + lastName}}
</div>
@rependa
rependa / XmVLgb.markdown
Last active October 21, 2015 19:23
XmVLgb
@rependa
rependa / BoJgdP.markdown
Last active October 21, 2015 19:27
BoJgdP