-
Angular CLI serve and base href
Several months have passed since Angular 2 was released. Then came Angular CLI promising easier scaffolding and better integration. It’s still in beta and as expected there are things to improve. One thing that confused me was ng serve and the lack of <base href> support. It’s easy when using ng build with the -bh flag and same feature for serve would’ve been great. Unfortunately the CLI team doesn’t plan on adding base href support 🙁 The project I’m working on relies on multiple other applications and APIs served from other folders. Having base href different than root during development…
-
How to Customize Bootstrap – Dos and Don’ts
Twitter Bootstrap 3 is great for creating responsive websites. It comes with many components and features that are easy to use and has a great documentation. That’s not always enough. Sometimes you need additional JavaScript functionality or custom CSS. You might even want to add additional jQuery plugins. Sooner or later you’ll hit an issue with some plugin or your code breaking stuff. In this articles I’ll share the common issues I’ve seen in bootstrap based projects and ways to avoid them when customizing the framework.
-
Using createjs WebAudio with Phonegap (Cordova)
One of the things I hate about Phonegap (Cordova) is the audio support. Every time I worked on a project that required heavy audio usage not a single plugin worked fine Cordova Media plugin is good for recording audio but when you try to play multiple audio files it leaks into memory and the OS stops your app. It also tends to break after using the recording feature. I’ve also tried the Native Audio plugin and although it’s much better it has its issues with features not working. The createjs team released a new soundjs plugin called CordovaAudioPlugin. It did work for…
-
JSON vs XML
Many of you have probably wondered which format is better or which should be used. You might have even participated in a full blown nerd rage war on the matter. Both formats are good when you want to describe a hierarchical structure. Differences XML is a markup language and is good for documents description or text documents with formatting information. JSON syntax is light. It’s much easier to parse from JavaScript and that’s why it’s preferred for browser-based and Phonegap mobile applications. So when should you use each one of them?
-
How to read an HTML page with UTF8 encoding using PowerShell
Yesterday I was working on a project that requires heavy HTML pages content scraping. What I wrote were several PowerShell files which were scraping the content using Invoke-WebRequest and Invoke-RestMethod. And everything was great and smooth… until I got to an HTML page with some Greek letters inside. To my surprise both PowerShell built in functions failed miserably when I tried to retrieve those UTF8 encoded pages. In short, I was bombarded with â and ¢ here and there. So, after I lost several hours trying to figure out what’s going on and experimenting with all kinds of options it…
-
Reusing page jQuery in a Greasemonkey script
Many times I’ve used a RIA or a website and wanted it to behave differently or have an additional functionality that I need. Thanks to Greasemonkey this is possible. We live in a jQueritifed world where most of the web pages use jQuery. That’s why on of the things that I need to do most of the time when I write a userscript is to reuse the jQuery from the webpage without loading a new jQuery instance from the web. This will make my script much more responsive and who needs to load something that is already there. Save your…
-
Eclipse Keybindings for Sublime Text 2
Ever wanted to use your Eclipse keybindings/shortcuts in Sublime Text 2? Are you too lazy to learn new shortcuts? (as I am) If the answer is yes then the following JSON is just for you: Open Sublime Text, goto Preferences -> Key Bindings-User and paste the JSON there. Enjoy the good old Eclipse shortcuts. The GIST with the shortcuts is what I need and use. It might not be full or contain all the features you need. If you need more or other shortcuts visit the Sublime Forum or see one of the following links. https://gist.github.com/thbkrkr/3194275 http://lerouxdelens.com/from-eclipse-to-sublime-keyboard-shortcuts/ If this is…
-
Applying CSS Styles Before Printing with AngularJS
In a world full of fancy shining jQuery plugins one can’t simply print. Often you’ll be using a grid JavaScript plugin or another heavy visualization component. One of the pitfalls you might experience with those components is that they don’t look nice when you try to print them. Sometimes this can’t be solved by with the dark side of the force a.k.a pure CSS. So, what are our options?
-
eRepublik Economy Helper
eRepublik Economy Helper is an addon script I’ve created for the browser game eRepublik. It’s purpose is to simplify the game economy and identify scammers on the black market. You can install the script from its UserScripts page – INSTALL Features list: Shows available products in your inventory on market page. Never again buy more resources than you need. Sets market and exchange market offers initial quantity from 1 (0) to max. Shows total value in CC for each offer inside the market. Show scammers warning on both – profile page and private messages page.
-
How to open FXG files?
Most of you, who’ve used Adobe Flex related products have probably used Flash Catalyst and the FXG format. You can open your old FXG files with Adobe Illustrator CS 6 or Flash Catalyst CS 5.5. Unfortunately (as it happens to all Fllex related technologies these days) the new version of Illustrator (Illustrator CC) can’t open the FXG files anymore and Catalyst is discontinued since 2012. So, what happens if we’ve upgraded to Adobe CC products. How do you open FXG files from your older projects? Well, this happened to me several days ago. After banging my head agains t the…