Apple Swift Package Manager : A Deep Dive

Apple Swift Package Manager : A Deep Dive

Automation, DevOps, iOSDev
Apple has released it's own package manager called 'Swift Package Manager' to share and distribute Swift packages. It's good to know that Apple is working on replacement of the current loved and hated package managers in the iOS development world those are CocoaPods and Carthage. In this article, we will cover basics of package management & deep dive into package management in iOS especially Swift Package Manager. Current iOS Package Managers Most modern languages come with an official solution for code distribution e.g RubyGems for Ruby,  Composer for PHP , NPM for NodeJS. In the iOS development world, developers has to rely on third party dependency management tools like CocoaPods and Carthage. The package managers in iOS has a additional job of building the code on top of downloading. Package manager should able to download as…
Read More

Building packages with Swift Package Manager and Docker without Xcode

Automation, iOSDev
Swift Package Manager Apple has recently open-sourced Swift and announced it's own package management tool called "Swift Package Manager". Swift has became cross platform and can be built on both macOS and Linux so Swift Package Manager can be Dependency Manager Build Tool Test Tool IBM is currently working hard to provide centralised repository for hosting those package and creating server side frameworks. The best place to learn about all the recent activity is 'swift.org'.  In this tutorial, we will create a Swift package on using Docker. Swift Package and Docker As Swift became server side, we can build it on the docker containers. In this short tutorial we will use IBM Swift3 Ubuntu Docker image to build a simple package. Let's create a directory called 'SwiftPM-Docker' and create a…
Read More

BrowserMob-CLI : Ruby library to generate HAR from command line

Automation, BDD
Introducing BrowserMob-CLI Recently, I wrote BrowserMob-CLI ruby gem which allows us to generate HAR files from command line. This will preview HAR files in the Browser as well as parse it in YAML. It works well for FirefoxDriver.  ChromeDriver/GhostDriver will be coming soon.  If you are new to HAR(HTTP Archive) & BrowserMob Proxy then please read these couple of links What is HAR HAR Spec BrowserMobProxy HAR file can be used for Calculate Load time. Set/Get HTTP Headers during your tests Capture performance data with HAR files. Simulate network traffic and latency Rewrite HTTP requests and response BrowserMob-Proxy It's a CLI wrapper around BrowserMob Proxy. BrowserMob Proxy is a utility which is used for capturing HTTP traffic and performance data from the browser. BrowserMob-Proxy adds in essential missing capabilities such as…
Read More

phpbrew: awesome PHP version Manager

Automation
phpbrew PHPBrew is a awesome PHP version management tool. It is very similar to RVM for Ruby version management. Now it become very easy to manage PHP versions on Mac OSX. Let's get started with phpbrew, get it installed [crayon-58a9852519353372057016/] Now we have installed phpbrew and we can initialise it.   [crayon-58a9852519362379035136/] Now,  we can add ' source ~/.phpbrew/bashrc' to .bashrc or .zshrc profile. Now you can list all known php versions and install specific version of PHP we want [crayon-58a985251936b561136341/] This will install php5.6.13  Install PHP Extensions Using phpbrew, installing php extensions is such an easy task. You can name extensions and run command [crayon-58a9852519373746981701/] We can also enable/disable extensions with phpbrew [crayon-58a985251937a040119023/] Now, we also install php components line composer or phpunit  Turn Off You can turn off…
Read More

Introducing Driller: Command Line Ruby based Web Crawler

Automation
Driller: RubyGem Glad to announce Ruby based web crawler 'Driller' to crawl website for error pages and slow pages. Driller is a command line Ruby based web crawler based on Anemone. Driller can Crawl website and reports error pages which are not 200 or 301. This will report all other HTTP codes. Driller will report slow pages which are returned response time > 5000 This will create three HTML files valid_urls.html which are 200 response. broken.html wich are not 200. slow_pages.html which are retuned reaponse time > 5000   You can download 'Driller' from Rubygems website here. Initials version has been just published [embed]https://twitter.com/rubygems/status/597857522393944064[/embed] Usage Add this line to your application's Gemfile: [crayon-58a9852519b6d247916981/] And then execute: [crayon-58a9852519b7a750814982/] Or install it yourself as: [crayon-58a9852519b8c887432183/] Driller takes two arguments URL of the…
Read More

Setting up oh my Zsh with iTerm2 on MacBook

Automation
Oh-My-Zsh Whenever I am on My Mac, I always love my tools and editors stand out from traditional and old-fashioned tools. Being a software professional we use terminal a lot to execute some commands. In the past, I have used terminal for Mac, iTerm2 in my day to day job and at home. Today I fall in love with 'oh-my-zsh' with iTerm2 and it's simple awesome. in this post, I will show you how I set that up on my MacBook Pro with OSX Yosemite. Install oh-my-zsh It's very simple, Open your bloody old style terminal Or iTerm 2 screen and type [crayon-58a985251a566777441933/]   Now you have installed oh-myzsh. Worth confirming by typing 'zsh --version' Now you should have '~/.zshrc' file created in your Home directory. We need to configure…
Read More

Visual Regression Tools: BackstopJS

Automation
Visual Regression In recent days, I came across mind blowing topic called 'Visual Regression'. There is still no proper definition of the visual regression but idea is fairly simple. In the Visual Regression world, we take screenshots of the live applications as a reference of base screenshots, and while we develop additional features we compare new screenshots with the reference or base screenshots to make sure existing functionality is not broken. If screenshots differ then visual regression testing tools warn you about the changes. There will be more in depth discussion in the #LDNSE 12 London Selenium Meetup at Huddle. Keep an eye on the meetup 'Visual Regression : PhantomCSS and Selenium". Details here http://www.meetup.com/seleniumlondon/events/220601189/ Visual regression testing sometimes called 'CSS Regression Testing. There are many tools available now to…
Read More

Naming iTerm2 Tabs in OSX

Automation
iTerm Tabs iTerm2 is the clever replacement for the OSX terminal. It has some benefits over terminal. As a web developer we need to work in the various tabs. It would be awesome idea to name iTerm tabs to identify whats going on each tab. Its very easy : Open iTerm cmd+T to open many tabs Colour tabs by right clicking and selecting different colour  Use cmd+I to get info about tab Type useful name in the 'name' field Press 'esc' key   Video: How to name iTerm2 Tabs https://www.youtube.com/watch?v=eo_ANf5GuvI  
Read More

Internet Speed Test from Mac OSX Command Line

Automation
Speed Test OSX iTerm There are various reason, you need to test your broadband speed. I got BT broadband and it sucks since last couple of months. I badly need to check what's current speed, I am getting right now without installing any applications. It's quick to do command line speed test. Thanks to OSX Daily (@osxdaily) for this awesome OSX tip. What we need to do is:  Open iTerm Or Terminal and execute following command [crayon-58a985251bf21897631880/] You will see an current speed highlighted below This will tell you current speed. Mine is too poor. Thanks BT  Create an alias in your .bash_profile Open you bash .bash_profile and add following line [crayon-58a985251bf31565443659/] Now, open iTerm and just type 'speedtest' [crayon-58a985251bf39015410152/] It will show you same result as above. This is…
Read More

HTTP Status code of multiple URLs from Text file

Automation
HTTP Status Codes There might be few tools available in the market which can be used for checking HTTPS codes for the urls. It would be an awesome to check HTTP status code  if we can have txt file with list of urls. Now, we will see a how to check HTTP status code of the urls available in the txt file. BASH Script Now, Let's write small bash script which will take txt file as an argument checks for the HTTP response code. [crayon-58a985251c5ac367110703/] And following bash code to the file [crayon-58a985251c5ba646298889/] This script is checking each line in the FILE and prints HTTP_CODE of the url. Now, Let's create a text file 'url.txt' with list of urls [crayon-58a985251c5c2283424085/] Now insert following urls [crayon-58a985251c5ca918180190/] Change the mode of both…
Read More