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 jsonp = function () { | |
| return { | |
| // JSONP Request | |
| request: function (src, callback) { | |
| try { | |
| var self = this, | |
| script = null; | |
| if (document.getElementById('jsonp') !== null) { | |
| script = document.getElementById('jsonp'); |
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
| /** | |
| * Between Elements | |
| * Gets all direct siblings between 2 elements. | |
| * | |
| * @param {Object} The first element or the current element (from itself, starting). | |
| * @param {Object} The last element (ending). | |
| * @param {Array} An array for the elements to be pushed in to. | |
| * @returns _betweenElements|Array | |
| */ | |
| function _betweenElements(currentElement, lastElement, elements) { |
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
| // Requires jquery.js, jquery.ui.effect.js, jquery.ui.effect-slide.js | |
| // Usage: ng-slide-vertically="scopeVariable" | |
| angular.module('namespace').directive('ngSlideVertically', function() { | |
| return function(scope, element, attr) { | |
| scope.$watch(attr.ngSlideVertically, function ngSlideVerticallyWatchAction(value){ | |
| if (value) { | |
| $(element).show('slide'); | |
| } else { | |
| $(element).hide('slide'); | |
| } |
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
| angular.module('namespace').directive('ngWindowResize', function($window, $parse) { | |
| return function(scope, element, attr) { // jshint ignore:line | |
| angular.element($window).bind('resize', function(event) { | |
| $parse(attr.ngWindowResize)(scope, { $event: event, $element: element }); | |
| }); | |
| }; | |
| }); |
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 readdirRecursSync(dir, filelist) { | |
| filelist = filelist || []; | |
| var files = fs.readdirSync(dir); | |
| files.forEach(function (file) { | |
| file = path.join(dir, file); | |
| if (fs.statSync(file).isDirectory()) { | |
| filelist = readdirRecursSync(file, filelist); |
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
| if (global.gc) { | |
| global.gc(); | |
| } else { | |
| console.log('Garbage collection unavailable, pass --expose-gc when launching node to enable forced garbage collection'); | |
| } |
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 isPrime(value) { | |
| for(var i = 2; i < value; i++) { | |
| if(value % i === 0) { | |
| return false; | |
| } | |
| } | |
| return value > 1; | |
| } |
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
| screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty | |
| #user: root | |
| #password: <none> | |
| $ ls -ltrh /var/lib/docker/volumes | |
| total 148 | |
| drwxr-xr-x 3 root root 4096 May 16 13:20 04576d248c19b1210d47e94c8211493428cd3c3aa71dfe3fa0f4214589a6f875 | |
| drwxr-xr-x 3 root root 4096 May 16 13:20 31af0f01492d8f7b832dad75e731b754302e84fbecfa7c654d7de10465bec204 | |
| drwxr-xr-x |
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
| { | |
| "browser": true, | |
| "es6": true, | |
| "jest": true, | |
| "node": true, | |
| "parserOptions": { | |
| "ecmaVersion": 6, | |
| "sourceType": "module", | |
| "ecmaFeatures": { | |
| "jsx": true |
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
| version: '3' | |
| services: | |
| localstack: | |
| image: localstack/localstack | |
| ports: | |
| - 4566:4566 | |
| environment: | |
| - AWS_DEFAULT_REGION=us-west-2 | |
| - EDGE_PORT=4566 | |
| - SERVICES=dynamodb,sqs,secretsmanager |
OlderNewer