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
| var promise = $q.all(null); | |
| angular.forEach(urls, function(url){ | |
| promise = promise.then(function(){ | |
| return $http({ | |
| method: 'GET', | |
| url:url | |
| }).then(function(res){ | |
| $scope.responses.push(res.data); | |
| }); |
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
| (function() { | |
| "use strict"; | |
| function loadJSAsync() { | |
| var js = document.createElement("script"); | |
| js.type = "text/javascript"; | |
| js.src = "script.js"; | |
| js.async = true; | |
| // insert the "js" script tag to the DOM here ... | |
| } | |
| if (window.attachEvent) { |
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
| 0 5 * * * /usr/bin/find /Users//.Trash -mindepth 1 -maxdepth 1 -mtime +14 -exec rm -rf {} \; |
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
| .Absolute-Center { | |
| margin: auto; | |
| position: absolute; | |
| top: 0; left: 0; bottom: 0; right: 0; | |
| } |
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
| @media screen and (max-width: 960px) { | |
| /** Style Rules here **/ | |
| } |
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
| <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;"> |
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
| app = angular.module('App', []); | |
| app.controller('MenuCtrl', function () {}); | |
| app.directive('focusIf', [function () { | |
| return function focusIf(scope, element, attr) { | |
| scope.$watch(attr.focusIf, function (newVal) { | |
| if (newVal) { | |
| scope.$evalAsync(function() { | |
| element[0].focus(); | |
| }); | |
| } |
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
| app.use(express.session({ | |
| secret:'secret', | |
| maxAge: new Date(Date.now() + 3600000), | |
| store: new MongoStore( | |
| {db:mongoose.connection.db}, | |
| function(err){ | |
| console.log(err || 'connect-mongodb setup ok'); | |
| }) | |
| })); |
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
| scp -r -C root@re.mo.te.host:/path/to/directory /local/path | |
| # копировать с удаленного хоста к себе | |
| # -r с вложенными директориями | |
| # -С с компрессией |
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
| <!-- root dict node --> | |
| <!-- <dict> --> | |
| <key>NSUIElement</key> | |
| <string>1</string> | |
| <!-- other code inside dict --> | |
| <!-- </dict> --> |