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
// FORMATOWANIE | |
function something(x, y, z){ | |
return (x-20 + 2*y)%2*z; | |
} | |
// czytelniejsza wersja | |
function something(x, y, z) | |
{ |
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
// Znajdz link z klasą tag-link-77 | |
// w czystym javascriptcie | |
var links = document.getElementsByTagName('a'); | |
for(var i in links){ | |
if(links[i] && links[i].classList && links[i].classList.contains('tag-link-77')) | |
console.log(links[i]); |
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
describe('Something', function () { | |
var $controller, $scope; | |
beforeEach(module('providersApp')); | |
beforeEach(inject(function (_$controller_, _$filter_) { |
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
'use strict'; | |
describe('Date Utils', function () { | |
var DateUtils; | |
beforeEach(module('providersApp')); | |
beforeEach(inject(function (_DateUtils_) { | |
DateUtils = _DateUtils_; |
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
# Turn on script | |
#!/bin/bash | |
sudo gem uninstall compass sass -aIx | |
sudo gem install sass compass --pre --verbose | |
sed -i "s/outputStyle: 'compressed'/outputStyle: 'compressed',sourcemap: true/g" Gruntfile.js | |
# Turn off script |
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 rows = []; | |
Array.prototype.forEach.call(groups, function(group){ | |
var header = group.querySelector('#name'); | |
if(header){ | |
rows.push('*** ' + header.textContent); | |
var tasks = group.querySelectorAll('.task .title'); | |
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 getRGB(color){ | |
colorArray = color.split(''); | |
colorArray.shift(); | |
var rgb =[]; | |
while(colorArray.length){ | |
rgb.push(parseInt('0x'+colorArray.splice(0,2).join(''))); | |
} | |
return 'rgb('+rgb.join(', ')+ ')'; |
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 f(arg){ | |
var rest = arg.slice(2).length == 0 ? '' : ',' + f(arg.slice(2)); | |
return parseInt(arg.slice(0,2),16) + rest; | |
} |
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 length(array){ | |
if(_.isUndefined(_.first(array))){ | |
return 0; | |
} | |
return 1 + length(_.rest(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
'use strict'; | |
var gulp = require('gulp'), | |
gutil = require('gulp-util'), | |
source = require('vinyl-source-stream'), | |
browserify = require('browserify'), | |
debowerify = require('debowerify'), | |
watchify = require('watchify'); | |
var distPath = './dist'; |