Angular doesn’t depend on jQuery. In fact, the Angular source contains an embedded lightweight alternative: jqLite. Still, when Angular detects the presence of a jQuery version in your page, it uses that full jQuery implementation in lieu of jqLite. One direct way in which this manifests itself is with Angular’s element abstraction. For example, in a directive you get access to the element that the directive applies to:
This file contains hidden or 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
| The regex patterns in this gist are intended only to match web URLs -- http, | |
| https, and naked domains like "example.com". For a pattern that attempts to | |
| match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502 | |
| License: https://opensource.org/license/bsd-3-clause | |
| # Single-line version: | |
| (?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps |
This file contains hidden or 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/sh | |
| #Inspired by https://gist.github.com/jbergantine/3870080 | |
| #Since every `git pull` is actually a merge. We can use it to automaticly run basic Django tasks after pulling from the upstream master branch (or any other) | |
| #Notice: This won't run at git fetch. since fetch doesn't merge anything | |
| #Installation: | |
| # copy this script with the name:`post-merge.sh` to your project root folder | |
| # symlink it to the ./git/hooks/post-merge: `ln post-merge.sh .git/hooks/post-merge | |
| #You should have bash (windows users, means cygwin/mingw anything that works for you | |
| #Based on the instructions here: https://oknesset-devel.readthedocs.org/en/latest/workflow.html#before-coding |
This file contains hidden or 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
| module ViewHelpers | |
| # Minify JSON | |
| def render_json(path) | |
| return render(path)\ | |
| .gsub(/\s+|\n/, " ")\ | |
| .gsub(/\"\: |\" \:/, "\"\:")\ | |
| .gsub(/ \,/, "\,")\ | |
| .gsub(/\, \"/, "\,\"")\ | |
| .gsub(/\, \-/, "\,\-")\ | |
| .gsub(/\, \[/, "\,\[")\ |
This file contains hidden or 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
| @import compass | |
| $icons: sprite-map("icons/*.png") | |
| $icons-hd: sprite-map("icons-hd/*.png") | |
| i | |
| background: $icons | |
| display: inline-block | |
| @media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) | |
| background: $icons-hd |
This file contains hidden or 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
| @zed = @zed ? {} | |
| @zed.info = do -> | |
| #private | |
| name = "" | |
| getName = -> name | |
| setName = (value) -> name = value | |
| age = 0 | |
| getAge = -> age |
This file contains hidden or 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
| require 'sprockets' | |
| require 'uglifier' | |
| require 'logger' | |
| namespace :website do | |
| desc "remove files in output directory" | |
| task :clean do | |
| puts "Removing output..." | |
| Dir["html/*"].each { |f| rm_rf(f) } |
This file contains hidden or 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
| { | |
| "USD": { | |
| "symbol": "$", | |
| "name": "US Dollar", | |
| "symbol_native": "$", | |
| "decimal_digits": 2, | |
| "rounding": 0, | |
| "code": "USD", | |
| "name_plural": "US dollars" | |
| }, |
This file contains hidden or 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
| /* Sample usage: +caret(bottom, 8px, #000); */ | |
| =caret($side, $size, $color) | |
| $opposite: opposite-position($side) | |
| +stretch(50%,auto,auto,50%) | |
| border: $size solid transparent | |
| border-#{$opposite}: $size solid $color | |
| border-#{$side}: 0 | |
| content: '' | |
| display: block |