Warsaw, Poland

Tomasz Rutkowski

Notes and varieties

Gulp with angular sample file, less, jasmin

var gulp = require('gulp'); var plugins = require('gulp-load-plugins')(); var rimraf = require('rimraf'); var paths = { less: ['./less/*.less'], js: ['./js/app/*.js', './js/app/**/*.js'], jsView: ['./js/app/views/*.html'], dist: { css: './public/css/', js: './public/js/', jsView: './public/views', }, vendor: { css:...
Read more

Javascript snippets

document.getElementById("p2").style.color = "blue"; document.getElementById("p2").style.fontFamily = "Arial"; document.getElementById("p2").style.fontSize = "larger"; var element = document.getElementById("div1"); element.classList.add("otherclass"); element.classList.remove("otherclass"); var x = document.getElementsByClassName("example"); x[0].innerHTML = "Hello World!";
Read more

Angular service to transform polish characters, letters, signs

'use strict'; angular.module('form-meet-agent').service('transformAccents',[ function (s) { this.getTransformed = function (s){ return s .replace(/ą/gi, 'a') .replace(/ę/gi, 'e') .replace(/ó/gi, 'o') .replace(/ń/gi, 'n') .replace(/ś/gi, 's') .replace(/ż/gi, 'z') .replace(/ź/gi, 'z') .replace(/ć/gi, 'c') .replace(/ł/gi, 'l') .replace(/\s/gi, '_') .toLowerCase(); }; }...
Read more
1 2 3 4 5 15