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('$q-spread', []) | |
.config(function ($provide) { | |
$provide.decorator('$q', function ($delegate) { | |
var originalAll = $delegate.all; | |
$delegate.all = function (promises) { | |
var promise = originalAll(promises); |
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
.bubble.thread { | |
opacity: 0.65; | |
} | |
.bubble.green { | |
border-color: #9554D2 !important; | |
color: #9554D2 !important; | |
fill: #9554D2 !important; | |
} |
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 a = document.getElementsByTagName('img'), i, l = a.length, s = ''; for (i = 4; i < l; i++) { s += a[i].src.substr(52, 1); } document.forms[0]['Spam'].value = s; | |
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
{ | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow.tmTheme", | |
"draw_white_space": "all", | |
"find_selected_text": true, | |
"fold_buttons": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", |
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 () { | |
var $dropView = $('<div style="position: absolute; left: 0; top: 0; bottom: 0; right: 0; background: rgba(0, 0, 0, 0.5); z-index: 9999; color: #fff; padding: 100px; text-align: center; font-size: 32px">drop music or playlists</div>'), | |
$body = $('body'), | |
songsToAdd = [], | |
filesToParse = []; | |
$body.append('<script src="https://raw.github.com/vjeux/jDataView/master/src/jdataview.js"></script>'); | |
Earport.Api.socket.on('search.query', songsFound); | |
Earport.Api.socket.on('playlist.queue', songQueued); |
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
<ul> | |
<li> | |
<a href="{{ url('acme_assets_get_all', { type: 'documents' }) }}"> | |
{% trans %}All Documents{% endtrans %} | |
</a> | |
</li> | |
<li> | |
<a href="{{ url('acme_assets_get_from_to', { type: 'documents', from: 10, to: 15 }) }}"> | |
{% trans %}Just a page{% endtrans %} |
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
<?php | |
class AssetController { | |
/** | |
* Get assets via some params | |
* @param string $type | |
* @param integer $from | |
* @param integer $to | |
* @return array |
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
/** | |
* Inject urls into the url service | |
*/ | |
Module.directive('url', ['$url', function injectUrlData($url) { | |
return { | |
restrict : 'A', | |
compile: function() { | |
return { | |
pre: function(scope, element, attrs) { |
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
/** | |
* URL service, holding urls for JS | |
*/ | |
Module.factory('$url', function Url() { | |
var $url = { | |
_urls: {}, | |
/** |
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
// some exampe controller | |
Module.controller('Example', ['$scope', '$http', '$url', function ($scope, $http, $url) { | |
// fetch assets from php controller | |
$scope.fetchFromTo(from, to) { | |
var url = $url.get('acme_get_assets_from_to', { type: 'documents', from: from, to: to }); | |
$http.get(url) | |
.success(function () { | |
// do something with the result |
OlderNewer