Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

I've made an Express.js based source viewer

posted in JavaScript on 2023-08-07   JavaScript Express source viewer

It's unsurprising that we all use Express.js when we need a web server. In this article, I'll show you how I built a source viewer. It's distributed as a npm package view-source and it could render the content of a directory in a nice tree-view style.

read more

The tiniest presentation framework

posted in JavaScript on 2022-03-06   presentation framework html javascript

I did roughly 50 talks over the years, and for almost all of them, I used Reveal.js. I like it because it's HTML-based. I have complete control of everything and can easily publish the slides online. However, one thing bugs me every single time - the size of my content. I want to use all the available space. This becomes very important when I'm showing code to people. That's why I wrote SimPre. It's a 10KB HTML presentation framework that properly scales and positions my content.

read more

Running Prettier for specific Git branch

posted in Architecture on 2020-01-14   prettier git bash script branch file awk print echo file awk run prettier line column file mode files project

I'm working on a project in my own git branch. At the end of my working day I want to do one thing - run Prettier so my code is nicely formatted before I submit the PR for code review. Of course I know about the VSCode Prettier extension but right now my editor is kinda broken and I don't want to mess with it. I'm still on my branch and I run Prettier from the terminal. All good but the amount of changes that happened is so big that my 50+ loc updates are like a needle in a haystack. It is like that because apparently there are already malformatted files in the project. It is definitely not possible to understand what I did because of so much noise. So ... I want to run Prettier but only on the files that I touched in that particular branch.

read more

From PHP to Node with Zeit's lambdas and Cypress.io

posted in JavaScript on 2019-05-23   https blog cypress content zeit html javascript article articles

The first post in this blog was published on 25th of August 2008. This place was always living on a shared PHP/MySQL hosting. It was driven by a custom made PHP CMS for over 10 years. It is time to move forward and follow my actual language of choice - JavaScript. I spent some time recently migrating it to Zeit and this article is showing my process.

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

Using Mocha with ES6 spec files

posted in JavaScript on 2015-12-23   mocha babel es6 package json file es5 babel preset es2015 tests test results javascript mocha reading spec files written

The new ES6 specification of JavaScript simply works better for me. It helps expressing my ideas in a shorter and cleaner way. So, I want to write ES6 everywhere. Even while I’m testing my applications.

read more

Node.js Blueprints book - second chapter's clarification

posted in Nodejs on 2014-07-30   express version book app chapter node js blueprints var bodyparser code

Before a couple of months my first book Node.js Blueprints was published by Packt. There are a couple of reviews in Amazon about chapter two. It’s about Express. One of the most popular frameworks in the Node.js ecosystem. The book mentions version 3.0 but the truth is that the code samples are for version 4.0. I feel that I still have to point out the differences and mark these parts of the chapter that are not valid for the newest version of the library.

read more

Node.js application made with Express and AbsurdJS

posted in Nodejs on 2014-06-07   html js function css express content styles absurdjs app

Node.js is one of those new technologies, which are attracting more and more developers every day. Mainly, because it's JavaScript driven, a lot of people are interested working with it. In this tutorial, I'll show you how to use AbsurdJS together with Express. Express is one of the popular Node.js frameworks. However, the other instrument is really fresh one and I hope that you will find it useful.

read more

ExpressionEngine: thumbnail could not be created for the image under Windows

posted in PHP on 2013-11-28   file windows thumbnail file upload preferences image created

I'm a Windows user and I'm working on a ExpressionEngine based site. I'm using EasyPHP as a server and everything works as expected. However, once I decided to upload a file I got "Thumbnail could not be created for the image. Please make sure the thumbnail directory is writable.".

read more

PHP: simple captcha script

posted in PHP on 2013-08-08   array code expression alphabet result im

In my company, we have a lot of WordPress sites. Some of them require contact form with captcha field. The short way for solving such task is to use a plugin. However, as you may guess, the add-ons are available for everyone, which means that they could be easily explored and probably hacked. That's why I suggested a simple, custom script, which is developed by us.

read more

Responsive Design Workflow (my talk at VarnaLab)

posted in HTML5 on 2013-05-23   varnalab presentation s slides talks

Presentation's slides. All my talks at VarnaLab are available here.

read more

A short review of ExpressionEngine framework

posted in PHP on 2013-05-20   short review expressionengine framework s capabilities tech pro account article made project start

I'm going to start a new project with ExpressionEngine. So, I made a short review of the framework's capabilities. The article is available at my account in tech.pro.

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

What is JavaScript prototype by Angus Croll

posted in JavaScript on 2012-06-30   javascript prototype understanding javascript prototypes http javascriptweblog wordpress language http javascriptweblog javascript language http context explanations

Maybe one of the best explanations of the prototype in the context of JavaScript language.http://javascriptweblog.wordpress.com/2010/06/07/understanding-javascript-prototypes/

read more

Creating mp3 player with RobotLegs (basics tutorial)

posted in ActionScript on 2011-02-09   import public function event data preloaderevent robotlegs events class

Have you ever wondered how to optimize your ActionScript applications? Have you searched for a nice framework that will save you a lot of time and will organize your structure? If yes then RobotLegs is for you. In this article I'll show you how to use it to create a simple mp3 player which loads a configuration xml file, parse it and play mp3 files.

read more

Code Flex applications with FlashDevelop

posted in ActionScript on 2010-06-07   flashdevelop flex project project9 press f5 project select flex property8 choose project location property8 choose sdk location property8 flex sdk location change flex sdk
read more

Google Chrome announcement

posted in Other on 2008-09-11   google chrome key engineering decisions interpretationof key engineering comics interpretationof key scott mccloud hood

"Look under the hood of Google Chrome in this comics interpretationof key engineering decisions, by Scott McCloud."

read more

5 helpful tips in photoshop

posted in Design on 2008-08-26   tool zoom layer click press selection keyboard button quick mask mode

1. Moving background layer - sometimes you want to move the background layer. But by default it's locked. So just click twice on the layer and choose "OK" in the popup message. The layer will be transformed to normal layer.

read more