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 myApp = angular.module('angularAppApp', ['$httpProvider']) | |
.config(function ($httpProvider) { | |
$httpProvider.defaults.useXDomain = true; | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
}); | |
function FetchCtrl($scope, $http, $templateCache) { | |
$scope.method = 'GET'; | |
$scope.url = 'http://echo.jsontest.com/key/value/one/two'; | |
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 cms = angular.module('cms', []); | |
cms.directive("clickToEdit", function() { | |
var editorTemplate = $j('#editTemplate').html(); | |
return { | |
restrict: "A", | |
replace: true, | |
template: editorTemplate, | |
scope: { | |
value: "=clickToEdit", | |
idx: '@' |
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
{ | |
"foo": "bar", | |
"baz": [ | |
1, | |
3, | |
5, | |
7 | |
] | |
} |
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
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
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
/* | |
* jquery.getselector.js | |
* | |
* Get the CSS Selector string for a provided jQuery object. | |
* | |
* Based heavily on jquery-getpath (http://davecardwell.co.uk/javascript/jquery/plugins/jquery-getpath/), | |
* and this xPath SO answer (http://stackoverflow.com/a/3454579). | |
* | |
* Usage: var select = $('#foo').getSelector(); | |
*/ |
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
(function($){ | |
$.fn.getSelector = function() { | |
element = this[0]; | |
var str = ''; | |
while(element && element.nodeType == 1) { | |
var id = $(element.parentNode).children(element.tagName).index(element) + 1; | |
id > 1 ? (id = ':nth-child(' + id + ')') : (id = ''); | |
if(str.length > 0) { | |
str = ' > ' + str; | |
} |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element" attributes="elements"> | |
<template> | |
<style> | |
#core_menu { | |
font-size: 16px; | |
left: 110px; | |
top: 40px; |
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
#!/bin/sh | |
if git-rev-parse --verify HEAD >/dev/null 2>&1; then | |
against=HEAD | |
else | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi | |
for FILE in `git diff --cached --name-only` ; do | |
# Check if the file contains 'debugger' |
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
{ | |
"social": { | |
"title": "Social Networks", | |
"subtitle": "Lorem ipsum dorem.", | |
"active": true, | |
"services": { | |
"twitter": { | |
"fields": [ | |
{ | |
"name": "username" |