-
Transpile to ES modules with Babel
posted in JavaScript on 2021-01-14 es babel javascript transpile typescript -
While I was working on Navigo an issue popped out. It was about using the library in the context of Web Dev Server where we have everything in TypeScript. And something was not ok with Navigo. The npm package wasn't exported properly and we were keep getting a
read moredoes not provide an export named 'default'
error. It turned out the problem is that Navigo is not exported properly as ES module (also known as ESM).
-
Replacing code for production with Babel transformation
posted in JavaScript on 2020-11-29 babel transform plugin production replacement -
If you are building some sort of an app, Babel is probably part of your build system. It is that thing which converts our fancy code to valid, working in a browser, JavaScript. Just recently at work I had to design a solution that swaps a class based on the environment. Or in another words, we have logic that should not reach our users. The file should be available locally and on our staging environment but not in production. A tiny Babel plugin was the cheapest solution for me so I decided to share the result.
read more
-
Transfer MP3 file from Mac OS Catalina to iPhone iOS 14.0
posted in Other on 2020-09-18 mp3 catalina iphone ios14 mac transfer -
I did transfer MP3 files from my mac to my iPhone three times and every time I'm forgetting how it actually works. So I decided to document the process into a blog post.
read more
-
Create your own Covid-19 data tracker
posted in JavaScript on 2020-03-30 covid-19 tracker virus api zeit covid https data github data tracker thevirustracker time johns hopkins university code back end endpoints react created recharts beginning tags tag link countries package sh https c19stats -
I'm continuing to experiment with React and TypeScript. The weekend-long project this time was a Covid-19 data tracker. In this blog post I will share how I built c19stats.now.sh. I exposed the data as a public API at the same URL. I guess you, as many other people, follow the situation so you may want to glue your fingers on the keyboard and create something useful around the data. I got lots of fun playing with the diagrams.
read more
-
Post-transpilation or what is the real face of your code
posted in JavaScript on 2017-10-10 function user return firstname lastname var person object constructor greeting -
If you write JavaScript today you probably use some sort of a transpilation tool. A tool that reads your hipster code and convert it to code that works in the browser. In this article we are going to see what is actually send to the browser and how exactly libraries like Babel polyfill some of the ES6 features.
read more
-
8 Years of blogging
posted in Must-see on 2017-01-02 javascript top year years pseudo elements css visits blog convert html string practice node js -
The first article on this blog is published on 22th of August 2008. It’s about a website which I saw at FWA. Eight years later I’m still publishing stuff here and because it is the beginning of a new year I decided to give you some statistics.
read more
-
Short movie by Oscar-winning animator Patrick Osborne
posted in Inspiration on 2016-07-10 animator patrick osborne winning animator patrick oscar winning animator -
Amazing art direction and storytelling in this one of a kind 360-degree musical short film from Oscar-winning animator Patrick Osborne. Watch out, it's a tear jerker!
read more
-
Constructive destructuring
posted in JavaScript on 2016-02-24 var destructuring function object data enabled files options attachments -
Destructuring is one of my favorite ES6(ES2015) features. It just shortens my code and helps me be more explicit with my statements. Let’s see it in action.
read more
-
Meet sequence expression
posted in JavaScript on 2016-02-02 var item b returns sequence expression true return skipif result loop -
You have no idea how fun is to transpiler JavaScript. I’m digging into that last few weeks and there is a step where I have to transform an AST into valid code. There is one tree node which I really like - sequence expression.
read more
-
Unexpected usage of Array.length
posted in JavaScript on 2016-01-14 arr length array b c d string undefined elements c d arr var arr words text -
I like reading code of other developers. It’s a nice way to learn patterns, techniques and small tricks. Recently I found something about
read moreArray.prototype.length
which caught my attention.
-
Start your own JavaScript library using webpack and ES6
posted in JavaScript on 2015-12-30 library js webpack babel true var file module exports eslint function build -
Two months ago I published a starter pack for React based on webpack. Today I found out that I need almost the same thing but without the React bit. This simplifies the setup but there are still some tricky parts. So, I made a brand new repository webpack-library-starter and placed all the stuff that we need for creating a JavaScript library.
read more
-
JavaScript's reduce could be really helpful
posted in JavaScript on 2015-12-25 testcase true patterns state reduce current cases expected return array test -
I love using functions like
read moremap
,filter
orreduce
. They are an important part of my arsenal and I simply can’t stop using them. Today I had to solve an interesting problem and I ended up usingreduce
.
-
Codefront.io retrospection
posted in Must-see on 2014-05-13 talk end conference nice interesting talked rest people track day things chance -
Okey, I normally don't write such articles. The things that I am writing about are technical stuff, concepts, experiments related to my job. However, this time will be a little bit different. I had a chance to speak at Codefront conference. And because it was so awesome I decided to share my experience.
read more
-
Simple, good looking separator made with pure CSS
posted in CSS3 on 2014-02-12 jsbin translate 95px 12px transform translate 95px line small link top solid 1px border top solid block border top display block border content display block -
I'm currently working on the official site of AbsurdJS. There are a lot of code samples out there and I wanted to present them in JSBins.
read more
-
Revealing the magic: How to properly convert HTML string to a DOM element
posted in JavaScript on 2014-01-23 wrapmap table tr element tbody var html td div map -
This seems like a trivial task. However, it is not. There are few popular solutions, but they have a big problem and if you use them a lot you will spot the issue.
read more
-
SASS and Gruntjs (Node.js setting up)
posted in Nodejs on 2014-01-14 grunt sass compass css add based gruntjs grunt contrib compass -
I'm writing a lot of JavaScript these days. Even if the project is not Node.js based I'm using it for processing some tasks. At the moment most of my projects use GruntJS. Today I spend some time adding SASS to my workflow.
read more
-
Managing events in JavaScript
posted in Must-see on 2013-08-23 model function var view controller eventbus callback function var scope event -
I just noticed that the most popular repository in my GitHub account is EventBus. There is already an article about it, but it's a little bit outdated. I needed to clarify few things, so here is a new one.
read more
-
Managing events in JavaScript
posted in JavaScript on 2013-08-23 model function var view controller eventbus callback function var scope event -
I just noticed that the most popular repository in my GitHub account is EventBus. There is already an article about it, but it's a little bit outdated. I needed to clarify few things, so here is a new one.
read more
-
AJAX request doesn't work in IE (url encoding problem)
posted in JavaScript on 2013-08-08 url api works json stringify parameter fixed -
The good old Internet Explorer. It's full with surprises. I just fixed a bug happening only in IE. Everything works just great in every other browser.
read more
-
Twitter streaming API, NodeJS and 401 Unauthorized error
posted in JavaScript on 2013-07-17 found server twitter streaming api -
I'm working on a year old application written in node. There is twitter streaming API implemented and it worked before a couple of months. These days we moved the site on another server and I found that it is not working anymore.
read more
-
Javascript string replace and regular expression
posted in JavaScript on 2013-06-15 word git replace string innerhtml text replace element innerhtml text changetext function word creator linus torvalds linux creator linus source project started -
The replace method in JavaScript is pretty much the same as in the other languages. Replace part/s of a string with something else. However, there are some tricky moments and I wanted to write this article, because I met this problem several times in the past. Actually, very often I use my blog as a documentation for myself and this is one of those cases. Probably I'll be in the same situation after week or so and I'll just check here for the proper solution.
read more
-
Simple command line parser in JavaScript
posted in JavaScript on 2013-06-11 long parameter param3 var parse command param1 commandparser parse command param3 commandparser parse param1 param2 param3 command param1 param2 param3 command param1 string function -
There should be some super cool RegEx, which I can use. However after short research I wasn't able to find it. So, I created a simple function which does the job.
read more
-
A strange IOErrorEvent.IO_ERROR event dispatched
posted in ActionScript on 2013-06-11 urlrequest var urlloader addeventlistener json encode obj string http site urlstring string http var urlstring string problem -
Really simple GET request from a flex based application. However it fails if GET parameters are passed.
read more
-
Front-Trends 2013 (Videos)
posted in Must-see on 2013-06-04 front trends videos -
Front-Trends is one of the best conferences in Europe. It's based in Poland and it's happening every year. I watched all the videos from the previous editions and I could say that it's worth it. Some of the biggest names in front-end development on one stage. All the videos are available in Vimeo, but I decided to post them here as well.
read more
-
Web Highlights #5
posted in HTML5 on 2013-05-30 http web design article unnecessary paints adobe device google street view code organizing javascript css paint times http www html5rocks -
Everyday I'm reading or watching something which I find helpful. Normally I bookmark those things, but at the end I have dozen of folders and subfolders which I never check. So, I decided to make such blog post where I'll share valuable things in the net.
read more
-
Web Highlights #4
posted in HTML5 on 2013-05-15 http performance media queries behavioral breakpoints tools google css transitions great optimize things -
Everyday I'm reading or watching something which I find helpful. Normally I bookmark those things, but at the end I have dozen of folders and subfolders which I never check. So, I decided to make such blog post where I'll share valuable things in the net.
read more
-
Make the web faster
posted in HTML5 on 2013-03-31 faster browser applications underlying problem tune slow javascript code js profiler chrome tracing ll talk structural profiler pages chrome devtools built build -
Slow JavaScript code on your pages? Chrome provides both a sampling, and a structural profiler to help you track down, isolate, and fix the underlying problem. Tune in to learn how to use both profilers, and how to improve your own workflow to build better, faster browser applications! We'll talk about chrome://tracing, the built-in JS profiler in DevTools, and much more.
read more
-
HTML slicing the site of VarnaLab using LESS and Twitter Bootstrap
posted in HTML5 on 2013-02-23 varnalab site bootstrap html slicing twitter bootstrap html -
HTML slicing the site of VarnaLab using LESS and Twitter Bootstrap
read more
-
sugru - self-setting rubber that can be formed by hand
posted in Inspiration on 2013-02-20 setting rubber hand formed sugru silicone rubber overnight flexible silicone rubber strong flexible silicone play dough bonds turns moulds exciting -
sugru is the exciting new self-setting rubber that can be formed by hand. It moulds like play-dough, bonds to almost anything and turns into a strong, flexible silicone rubber overnight.
read more
-
Chrome Devevelopment Tools could be really helpful
posted in HTML5 on 2013-02-09 detecting memory leaks network performance rendering analyze network performance instrumented development platforms googledevelopers channel strongly recommend ilya grigorik nice screencast build faster javascript code -
"Your browser is one of the most and best instrumented development platforms -- you may just not realize it yet. In this episode we'll take a whirlwind tour of how to analyze network performance, rendering and layout pipeline, as well as detecting memory leaks in your Javascript code, and using audits and extensions to build faster and better apps!". A nice screencast by Ilya Grigorik. I strongly recommend the subscription to GoogleDevelopers channel.
read more
-
Cleaning up <pre> tag content
posted in PHP on 2013-02-02 code newstr pre parts2 code str_replace br parts str code code str_replace br code code -
I'm blogging for different technologies, but very often I need to add some code in my articles. This little PHP function helps me to keep the text in my
tags clean for prettify. It simply removes the
's and keeps the html tags. read more
-
Moving elements with translate() is better than absolute positioning (top, left, right, bottom)
posted in HTML5 on 2013-01-31 bottom translate -
If you plan to make an animation by using position: absolute and set top, left, right or bottom please don't. Just use translate. It's just better, as Paul Irish proves.
read more
-
The Principles of Agile Development
posted in Architecture on 2012-07-10 agile development principles http net tutsplus sides http net fun developing software agile development agile articles general communication easy business people constructive -
Agile or Agile Development – we hear these words more often these days. But do we really know what it is all about? How can it help us become more effective, while having lots of fun developing software? How can we use it to communicate with business people and make this communication easy and constructive for both sides?http://net.tutsplus.com/articles/general/the-principles-of-agile-development/
read more
-
PHP: the right way
posted in PHP on 2012-07-09 php bad http www phptherightway web http www accepted coding standards practices accepted coding read quick reference propagating bad practices astray propagating bad users astray propagating -
There’s a lot of bad information on the Web (I’m looking at you, W3Schools) that leads new PHP users astray, propagating bad practices and bad code. This must stop. PHP: The Right Way is an easy-to-read, quick reference for PHP best practices, accepted coding standards, and links to authoritative tutorials around the Web.http://www.phptherightway.com/
read more
-
API Design by Matt Gemmell
posted in Architecture on 2012-05-25 strongly recommend helpful article check class write -
Did you ever wonder how to write your class. That's a very helpful article. I strongly recommend it. Check it here.
read more
-
Speed Up Your JavaScript
posted in JavaScript on 2012-04-26 javascript 2nd edition wrox contributor author slow -
As an interpreted language, JavaScript is filled with hidden performance issues that conspire to slow down your code and ruin the user experience. Learn exactly what is fast, what is slow, and what you can do to squeeze that last bit of performance out of your JavaScript code.
read more
-
PEAR PHP Coding Standarts
posted in PHP on 2012-02-29 pear en standards php manual en standards net manual en php net manual pear php net http pear php folks http pear pear folks http distribution coding standards -
The PEAR Coding Standards apply to code that is part of the official PEAR distribution. Coding standards often abbreviated as CS among developers and they aim to keep code consistent to be easily readable and maintainable by most of PEAR folks.http://pear.php.net/manual/en/standards.php
read more
-
The Dependency Inversion Principle
posted in Architecture on 2012-01-24 depend abstractions dependency inversion principle abstractions b abstractions low level modules high level modules higher level components inversion principle relates abstractions read details details -
The Dependency Inversion Principle relates to the stability and reusability of higher-level components within an application. The principle states:_A. High-level modules should not depend on low-level modules. Both should depend on abstractions.B. Abstractions should not depend upon details. Details should depend upon abstractions._Read more here.
read more
-
Adobe\'s strategic transformation and the Flash Platform
posted in ActionScript on 2011-11-20 adobe adobe community read full article social connections touch interfaces fundamental transformation change innovation time devices -
Adobe is in the midst of a fundamental transformation. We are transforming from software in boxes to solutions in the cloud, and to a world of touch interfaces on devices, and social connections everywhere. This is a time of both innovation and change for Adobe and for the Adobe community ...Read the full article here.
read more
-
Colorize your output in FlashDevelop
posted in ActionScript on 2011-10-08 trace flashdevelop -
Did you ever wonder how to change the color of your traces in FlashDevelop. It's possible and it is really helpful feature.
read more
-
Finally! My Pomodoro Robotlegs timer is here
posted in Inspiration on 2011-09-29 pomodoro timer break method pomodoro robotlegs timer pomodoro technique task stray -
Today I received my Pomodoro Robotlegs timer. Special thanks to Stray and Robotlegs team for this little gem.
read more
-
JSConf.eu 2011
posted in JavaScript on 2011-09-11 blip tv jsconfeu http blip tv european javascript conference strongly recommend shared online s scheduled watch year happened lectures -
The European JavaScript conference is really close. It's scheduled for 01 and 02 of October. I wish I could be there. I hope that the videos from the lectures will be shared online, as this happened for the last year. I strongly recommend to watch them. There are available here http://blip.tv/jsconfeu.
read more
-
AS3: Tracing in Flash/Flex
posted in ActionScript on 2011-08-16 import flash public str function debug movieclip void trace swf class -
Inspired by the article of Dru Kepple I decided to share my experience in Debugging processes in flash/flex enviroment.
read more
-
AS3: Dealing with multi-language data in your application
posted in ActionScript on 2011-06-16 language storage key class text key string static storage addvalue http www site trace storage getvalue -
I'm a big fen of the MVC pattern. I like the idea to store my data in one place and be able to get it fast. In most of my projects I used a class called Storage for similar purpose. It supports a multi-language data saving, so I decided to share it with you.
read more
-
AS3: runtime font loading (embedding)
posted in ActionScript on 2011-04-25 font field loader import flash swf public static const format font_export_name string font_file_name class -
Flash is wonderful technology and has many advantages. Before a couple of years it was really popuplar to use it for displaying fonts that are not installed on the user's machine. Flash is still powerfull tool for such kind of tasks. These days I worked on a project which had to use a lot of fonts. It wasn't possible to embed all of them so I decided to implement runtime embedding.
read more
-
FlashDevelop scripting: open file by text selection
posted in ActionScript on 2011-03-20 file script projectpath system path text private static string plugincore -
FlashDevelop is one of the most preferred editors for the flash development. I've been also using it last few years. I found it helpful for writing JavaScript, HTML, CSS and PHP code as well. I just took a big project with over 1000 php files and it is a little bit difficult to open the right file, even by using the Project panel. That's why I decided to invest time in solving this task and found that I can write my own C# script and run it.
read more
-
Creating simple WYSIWYG editor with AS3 (Flex)
posted in ActionScript on 2011-02-11 text str function font html string editor mx var code -
There are dozen of JavaScript WYSIWYG editors available, but most of them are too complicated and a little bit buggy. From time to time I'm using my own tool to provide such kind of functionality. It accepts and exports valid html. I decided to share it with you and explain how I built it.
read more
-
AS3: Using custom metadata in flex (part 2)
posted in ActionScript on 2011-01-27 metadata public var data class string public var method metadataparser mycustomclass tag -
Because of the huge interest in AS3: Using Custom Metadata in Flex (part 1) I decided to dig a little bit deeper in this topic. You already know how to get information about your custom metadata, so in this article I'll show you how to use it.
read more
-
Javascript: handling keyboard shortcuts with jQuery
posted in JavaScript on 2011-01-19 ctrl shift f9 document log key jquery -
Last few years the JavaScript frameworks are big part of our web sites. I strongly recommend the usage of tools like jQuery or MooTools, because they will save you a lot of time and problems. These days I needed to create a keyboard shortcut for one of the projects that I'm working on. I wanted to catch the Ctrl+Shift+F9 combination. It was just a few lines of code and I decided to share it with you.
read more
-
PHP: Simple javascript obfuscator (merging files)
posted in PHP on 2010-12-30 jsstr jsstr jsstr str_replace jsstr str_replace jsstr str_replace jsstr jsstr js files fh file comment js core plugins -
Currently I'm working on a big JavaScript project. It has a lot of files that have to be compressed. I wrote a simple php class that merges all the files into one. It has also a useful simple obfuscator method.
read more
-
Javascript: autocomplete country script
posted in JavaScript on 2010-12-06 field function helper ac countries var loop div script javascript -
We are all filling registration forms. It's really nice when the page helps us to do that faster. The script, that I'm going to show you, is designed to be used for a country field.
read more
-
Film Inspiration
posted in Inspiration on 2010-11-25 vimeo muestra animada - read more
-
PHP: find links in a string and replace them with actual html link tags
posted in PHP on 2010-11-24 urlstoreplace str numofurlstoreplace urls alreadyadded numofurlstoreplace count urlstoreplace html link tags -
Currently I'm working on an application that gets data from Twitter. The tweet's string contains links that have to be transformed into html link tags. Here is a simple PHP function that helped me.
read more
-
Remove html tags from a string wtih PHP
posted in PHP on 2010-11-12 str tag remove str return str ius str return -
Sometimes you don't need any formatting. That's just a nice way to remove all the html tags.
read more
-
How to protect your SWF file
posted in ActionScript on 2010-10-15 function swf protect void check file import flash public ondatafiledtoload onfailed files string -
Is there any way to protect your flash work? To be honest the answer is NO. As you probably know everything that is uploaded on a web server and is accessible from a web browser is downloaded to the users' computers and could be found in the temporary directories. Once someone gets your swf file he could use one of the dozen decompilers to reproduce the .fla and .as files. Anyway, there are still some ways to make stealing difficult.
read more
-
Distort MovieClip in Flash with AS3
posted in ActionScript on 2010-09-05 getrandomnum clip setting mtd tweentype out_expo end getrandomnum distort private function number movieclip distortimagewrapper -
As you probably know there is no simple way to distort a MovieClip in Flash. The solution that I've found uses AS3. Special thanks to Thomas Pfeiffer and Ruben Swieringa. They share their experience with this problem.
read more
-
Trace JSON object in AS3
posted in ActionScript on 2010-07-17 str description gettypeof o spaces var object information users -
I'm absolutely sure that all of you are working with JSON objects. It's pretty helpful to be able to print them and find out what exactly they contain. I wrote a simple function that makes this possible.
read more
-
Load MySQL data in Flash with AS3
posted in ActionScript on 2010-07-10 text data city import flash ondatafiledtoload php file onloaddata string url -
There are some things that I'm doing in almost every project. Loading of data in Flash is actually one of them. In this article I'll show you how to load information from MySQL database. We will use PHP as a junction between the Flash and the database. You need an Apache server like XAMPP or EasyPHP installed or just a hosting account that supports php.
read more
-
Remove tags from a string in AS3
posted in ActionScript on 2010-06-30 text tags var string text replace removehtml text text replace gi text text str regexp gi text -
A couple of months ago I integrated a nice WYSIWYG editor written in Flex in my CMS. It worked fine, till yesterday I needed to add more features like text formatting and font color changing. As you know the Flex RichTextEditor component adds some additional tags that I definitely don't want to send to the database. So I wrote a simple function to remove these tags.
read more
-
Embed fonts in all the text fields of your flash document
posted in ActionScript on 2010-02-26 jsfl script flash embed main flash_cs3_extending pdf http livedocs adobe simply ctrl r commangs run command flash commangs run jsfl embedcharactersintextfield jsfl -
Very helpful solution that will save you maybe several hours. I used JSFL language and very short script to parse all the items in the library. Then for every item just embed the characters that I wanted. Get the script from here http://www.outset.ws/files/jsfl/embedCharactersInTextField.jsfl. In flash: Commangs -> Run command (or simply Ctrl+R) and point the script file.You can download the jsfl documentation from here http://livedocs.adobe.com/flash/9.0/main/flash_cs3_extending.pdf.
read more
-
FILMEFEX Studio
posted in Inspiration on 2008-09-15 filmefex studio picture industry check motion picture industry special effects facility create effects design -
Filmefex Studio is a special effects facility, where they design and create effects for the motion picture industry. Check out here
read more