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
| <!-- https://gist.github.com/abulte/5264753 --> | |
| {%- macro form_field_label(field) -%} | |
| <label class="control-label" for="{{ field.id }}">{{ field.label.text }} | |
| {%- if field.flags.required -%} | |
| <abbr title="Required"> *</abbr> | |
| {%- endif %}</label> | |
| {% endmacro %} | |
| {%- macro form_field_help(help) -%} |
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
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright 2013 Alexandre Bulté <alexandre[at]bulte[dot]net> | |
| # | |
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
| ## Requirements |
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
| # CORS Headers (add this) | |
| <ifModule mod_headers.c> | |
| Header always set Access-Control-Allow-Origin: "*" | |
| Header always set Access-Control-Allow-Methods "POST, GET, PUT, DELETE, OPTIONS" | |
| Header always set Access-Control-Allow-Headers "X-Requested-With, content-type" | |
| </ifModule> | |
| # BEGIN WordPress (you should have this in your original WP .htaccess) | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On |
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
| myApp.config(['$httpProvider', function($httpProvider) { | |
| $httpProvider.defaults.useXDomain = true; | |
| delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
| } | |
| ]); |
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.directive('mesureTime', function() { | |
| return { | |
| restrict: 'A', | |
| // require: 'ngModel', | |
| link: function(scope, elm, attrs, ctrl) { | |
| var timeTouch; | |
| elm.on('click', function() { | |
| if (timeTouch) { | |
| alert(new Date().getTime() - timeTouch, " ms"); | |
| } else { |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am abulte on github. | |
| * I am abulte (https://keybase.io/abulte) on keybase. | |
| * I have a public key whose fingerprint is 2AF6 528B BA92 D7AC 4F92 DF0B D126 E953 8D0C 3164 | |
| To claim this, I am signing this object: |