# file
-
Architecture _ 2020-01-14
Running Prettier for specific Git branch
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.
-
JavaScript _ 2018-11-13
Build your own interactive JavaScript playground
Recently I spent some time working on my own JavaScript playground called Demoit. Something like CodeSandbox, JSBin or Codepen. I already blogged about why I did it but decided to write down some implementation details. Everything happens at runtime in the browser so it is pretty interesting project.
-
JavaScript _ 2018-11-05
My new and shiny tool for live demos - Demoit
-
JavaScript _ 2016-06-13
The bare minimum to work with React
The setup here is available at GitHub here.
Half an year ago I published A modern React starter pack based on webpack. The starter provides the basic tooling around React. However, I noticed that very often I need even less stuff than that. That’s usually when I want to hack something quickly. In this blog post we’ll see what’s the bare minimum to work with React.
-
JavaScript _ 2016-02-24
Constructive destructuring
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.
-
JavaScript _ 2015-12-30
Start your own JavaScript library using webpack and ES6
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.
-
JavaScript _ 2015-12-23
Using Mocha with ES6 spec files
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.
-
JavaScript _ 2015-11-23
Distributing React components
While I was open sourcing react-place I noticed that there is some complexity around preparing the component for releasing. I decided to document the process here so I have a solid resource next time. You may be surprised but writing the working
jsxfile doesn’t mean that the component is ready for publishing and is usable for other developers. -
JavaScript _ 2015-10-01
A modern React starter pack based on webpack
Checkout React webpack starter in GitHub.
You know how crazy is the JavaScript world nowadays. There are new frameworks, libraries and tools coming every day. Frequently I’m exploring some of these goodies. I got a week long holiday. I promised to myself that I’ll not code, read or watch about code. Well, it’s stronger than me. React werbpack starter is the result of my no-programming week.
-
Must-see _ 2014-08-25
My front-end performance case study
I’m reading and watching a lot of interesting things regarding client-side performance. I’m interested in the browser’s processes happening before and just after the page’s load. There are tons of stuff to think about. Before a couple of days, I joined the online workshop of Vitaly Friedman. I had a great time and learned some clever facts about performance optimization.
-
Nodejs _ 2014-01-22
Using Node.js to rename set of images
Today I had to rename a bunch of image files to the same names, but in lower case. Here is how I did it.
-
PHP _ 2013-11-28
ExpressionEngine: thumbnail could not be created for the image under Windows
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.".
-
ActionScript _ 2013-06-26
Security sandbox violation error even with crossdomain.xml
Again, a very nice surprise by Adobe. I have a flex application which makes cross-domain requests to another server holding REST API. There is a crossdomain.xml file, but the request still doesn't work.
-
PHP _ 2013-06-25
Deploying ExpressionEngine based site
I found ExpressionEngine framework very good. It brings the flexibility which I need and still has a good amount of features. However, as many other similar tools, the deployment could be a little bit difficult.
-
JavaScript _ 2013-06-18
Insert css or javascript dynamically
That's a super simple function for adding new css or javascript files in the current document. I didn't test it in all the browsers, because I'm using it in the chrome extension and I need only Chrome supported.
-
ActionScript _ 2013-06-13
Flash, nodejs sockets and cross-domain policy file
Ok, that was a long journey. I took an already build project and I had to make some changes. It's a complex system involving flex applications, nodejs and a mobile site. Before to start making changes I had to setup the project and make it work on my local machine. I spend few days doing this. At the end I successfully compile the flex application and made the necessary corrections. I uploaded the new swf file and of course it didn't work.
-
PHP _ 2013-06-05
mod_rewrite, one simple rule and two stupidly lost hours
Ok, I should admit that mod_rewrite and regular expressions are not my strongest part. Today - as every other day I realize how little knowledge I have. Actually it's good to have such moments. I lost almost two hours fighting with a really really simple mod_rewrite rule in my .htaccess file.
-
Architecture _ 2013-05-29
Git under windows (console mode)
I'm a Windows user. I also have a virtual machine with Ubuntu installed and coding there from time to time. I use Git a lot and in general I prefer console mode over the GUI. Under Unix everything works just great, but Windows's command prompt requires more efforts from our side. However I found some helpful tips, which could make your life easier.
-
HTML5 _ 2013-03-31
Make the web faster
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.
-
Nodejs _ 2013-03-16
AssetsPack - a friend of the front-end developer (pack your assets with NodeJS)
AssetsPack is a NodeJS module which helps in organization, compilation and minification of assets. It's meant to be used in local environment during the development process. It was made generally for HTML/CSS/JavaScript based applications.
-
ActionScript _ 2013-03-06
Compiling iOS application under Windows with Flex SDK
As you may know, Apple doesn't allow creation of iOS applications just like that. Especially under Windows. It's somehow a complex process, which requires several steps in a specific order. However it is still possible and you can do that without Mac.
-
Architecture _ 2013-01-28
SVN: Ignoring files and directories
I really like GIT and I think that is a better version control system than SVN. Anyway, I still have to use SVN for some projects and ignoring files is always a problem.
-
ActionScript _ 2011-04-25
AS3: runtime font loading (embedding)
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.
-
ActionScript _ 2011-03-29
FlashDevelop scripting: open file by name (part 2)
After a couple of days of using my script for file opening I decided to rewrite it and add more functionalities.
-
ActionScript _ 2011-03-20
FlashDevelop scripting: open file by text selection
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.
-
PHP _ 2010-12-30
PHP: Simple javascript obfuscator (merging files)
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.
-
ActionScript _ 2010-12-18
How to generate SWC file from ActionScript package
SWC file format is really useful when you want to transfer or to compact your ActionScript libraries. It is also used for exporting assets, which can be used later. Let's imagine that you want to create a .swc file for only small part of your application, i.e. pure .as files. I searched a lot for the fastest and easier solution and finally I think that the usage of compc.exe is the best option.
-
PHP _ 2010-11-11
How to import images directly into the html code (base64)
-
ActionScript _ 2010-10-26
checkPolicyFile flag was not set
Sometimes the uploading of crossdomain.xml file is not enough to get the things working.
-
ActionScript _ 2010-10-15
How to protect your SWF file
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.
-
PHP _ 2010-09-04
Export mysql data to SQL script or CSV
Yesterday I received host name, user name and password for a MySQL server. I needed to export the data from it. I didn't have access to PHPMyAdmin, I tried to connect to the server by mysql.exe on my PC, but it didn't work. And then I found really good solution - PHPMyAdmin in only one php file. I launched it from my localhost and it works. So if you need to export data or just see it, use Adminer. I also uploaded the file on my server, you can download it from here.
-
ActionScript _ 2010-07-10
Load MySQL data in Flash with AS3
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.
-
PHP _ 2010-06-17
How to exclude directory from .htaccess file
Did you ever wonder how to exclude a directory from a .htaccess file. Here is the solution, it works perfect for me.