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 Pesel = { | |
| getDateByPesel: function (pesel) { | |
| var l, c, birth = [ | |
| pesel.substr(0, 2), | |
| pesel.substr(2, 2), | |
| pesel.substr(4, 2) | |
| ], | |
| isOdd = function (c) { | |
| return (c % 2 === 1); | |
| }, years = { |
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 AlertManager = function(){ | |
| var template = '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>'; | |
| this.setText = function(type, text){ | |
| $scope.alert = {text: $sce.trustAsHtml(template+text), type: (type || 'danger')}; | |
| }; | |
| this.setDangerAlert = function(text){ | |
| this.setText('danger',text); | |
| }; | |
| this.setSuccessAlert = function(text){ | |
| this.setText('success',text); |
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("ui.mylib", ["ui.mylib.tpls", "ui.mylib.example"]); | |
| angular.module("ui.mylib.tpls", ["template/example.html"]); | |
| angular.module("template/example.html", []).run(["$templateCache", function($templateCache) { | |
| $templateCache.put("template/example.html", | |
| "<b>to jest przykladowy template</b>"); | |
| }]); | |
| angular.module("ui.mylib.example", []) | |
| .directive('example', function () { |
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 modalController = function($scope, $modalInstance, arg) { | |
| $scope.arg = arg; | |
| $scope.submit = function() { | |
| $modalInstance.close({}); | |
| }; | |
| $scope.cancel = function() { | |
| $modalInstance.dismiss('cancel'); | |
| }; | |
| }; |
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
| <!DOCTYPE html> | |
| <!-- | |
| Created using JS Bin | |
| http://jsbin.com | |
| Released under the MIT license: http://jsbin.mit-license.org | |
| --> | |
| <html> | |
| <head> | |
| <script src="http://code.jquery.com/jquery.min.js"></script> |
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
| grunt.registerTask('bs', 'sadas', function(){ | |
| var result2, result3; | |
| var realPaths = grunt.file.expand({ | |
| cwd: 'project' | |
| },'**/*.js'); | |
| result2 = _.map(realPaths, function(path){ | |
| var parts = path.split('/'); |
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 sheet = SpreadsheetApp.getActive(); | |
| ScriptApp.newTrigger("myFunction") | |
| .forSpreadsheet(sheet) | |
| .onEdit() | |
| .create(); | |
| var response = UrlFetchApp.fetch("http://jsonplaceholder.typicode.com/posts/"); | |
| Logger.log(response); |
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 setTimestamp() { | |
| var formattedDate = Utilities.formatDate(new Date(), "GMT+2", "yyyy-MM-dd HH:mm:ss"); | |
| return formattedDate; | |
| } | |
| var mapper = { | |
| 'client': { | |
| col: 1, | |
| parse: function(input){ |
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('ctrl-injector', ['ui.router']) | |
| .directive('ctrlInjector', ["$q", "$log", "$controller", "$resolve", function ($q, $log, $controller, $resolve) { | |
| var link = function (scope, $element) { | |
| $resolve.resolve(scope.config.resolve || {}).then(function (result) { | |
| var dependancies = _.extend(scope.config.dependancies || {}, result); | |
| var controller = $controller(scope.config.controller, dependancies); | |
| scope[scope.config.controllerAs] = controller; | |
| scope._common = scope.config.common || {}; | |
| if (scope.config.customizeController) { |
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 fs = require('fs'), | |
| path = require('path'), | |
| npmShrinkwrapJson; | |
| const NPM_SHRINKWRAP_PATH = path.join(__dirname, './npm-shrinkwrap.json'), | |
| JSON_INDENT = ' '; | |
| IGNORED_FIELDS = ['from', 'resolved']; | |
| fs.readFile(NPM_SHRINKWRAP_PATH, function(err, npmShrinkwrapConent){ | |
| if(err){ |
OlderNewer