This file contains 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
'use strict' | |
const fs = require('fs') | |
const path = require('path') | |
const { sync: resolveSync } = require('resolve') | |
const acornLoose = require('acorn-loose') | |
const walk = require('acorn-walk') | |
const resolveImportSourcePathSync = (filePath, importSource) => { | |
return resolveSync(importSource, { |
This file contains 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 axios from 'axios' | |
import httpAdapter from 'axios/lib/adapters/http' | |
import { API_URL } from '../src/config/environment' | |
axios.defaults.host = API_URL | |
axios.defaults.adapter = httpAdapter |
This file contains 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
{ | |
"printWidth": 100, | |
"tabWidth": 2, | |
"singleQuote": true, | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"jsxBracketSameLine": false, | |
"parser": "babylon", | |
"semi": false, | |
"arrowParens": "always" |
This file contains 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
FROM node | |
RUN mkdir -p /usr/src/app | |
WORKDIR /usr/src/app | |
ENV AUDIO_PATH '/proc/asound/card0/pcm0p/sub0/status' | |
ENV ENDPOINT_ON 'http://localhost:1880/amp/on' | |
ENV ENDPOINT_OFF 'http://localhost:1880/amp/off' | |
COPY . /usr/src/app |
This file contains 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
[user] | |
email = [email protected] | |
name = enapupe | |
[push] | |
default = current | |
[core] | |
excludesfile = ~/.gitignore_global | |
pager = diff-so-fancy | less --tabs=4 -RFX | |
editor = subl -n -w | |
[alias] |
This file contains 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
var data = {"building": [ | |
{ | |
"volume": 3338.91764606872, | |
"perimeter": 137.87671346974363, | |
"points": [ | |
[ | |
78.7396821640909, | |
106.35271207241327, | |
0 | |
], |
This file contains 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
angular.module("myApp").directive("theTooltip", function($timeout, $sce){ | |
return { | |
restrict: "E", | |
template: "<tooltip-arrow arrow-top></tooltip-arrow><tooltip-content ng-bind-html=\"content\"></tooltip-content><tooltip-arrow></tooltip-arrow>", | |
link: function(scope, elem, attr){ | |
scope.$on("tooltip.show", function(undefined, newval){ | |
elem.css("visibility", "hidden"); | |
scope.content = $sce.trustAsHtml(newval.content); | |
// aplicamos o escopo para forçar a renderizacao do novo content | |
// no tooltip, e assim poder calcular o novo tamanho no próximo |
This file contains 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
angular.module("myApp").directive("form", function(){ | |
return { | |
require: "^form", | |
link: function(scope, elem, attr, ctrl){ | |
elem.on("reset", function(){ | |
ctrl.$setPristine(); | |
}); | |
} | |
}; | |
}); |
This file contains 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
"use strict"; | |
myApp.controller("SomeCtrl", function($scope){ | |
$scope.callback = function(){ | |
// do something | |
}; | |
$scope.url = "http://some/popup"; | |
}); |
This file contains 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.directive("focusMe", function($timeout){ | |
return { | |
restrict: "A", | |
link: function(scope, element, attrs){ | |
scope.$watch(attrs.focusMe, function(value){ | |
if(value === true){ | |
$timeout(function(){ | |
element[0].focus(); | |
}); | |
} |
NewerOlder