Wednesday 3 February 2016

Basic print examples in Unix using Sed

I was long thinking to write a short tutorial on covering some basic Sed examples for easy and quick reference. So here we are. In this short post I'll try to include some basic print examples with some variety... the more the merrier right?

The sample Testfile.txt we'll be using in this example is as below :

1.Here is a cute little tutorial for
2.trying out printing things using
3.the Stream Editor or Sed in Unix.
4.The author of this tutorial is
5.none other than IroncladWriter
6.himself. The tutorial aims to
7.teach folks and educate how
8.they could unlock the power
9.of Unix to the fullest. Am posting
10.this on the blog IronCladZone
11.The best blog on the whole of
12.internet, where you can learn
13.technical stuff as well enjoy 
14.entertaining tidbits like movies,
15.music, television, fashion, food,
16.shopping, travel, trends etc.
17.Just sit back, relax and

18.ENJOY THE RIDE :)

* Print only the first line of a file

sed -n '1p' Testfile.txt

OR you could also use the following:

sed q Testfile.txt

* Print only the last line of a file

sed -n '$p' Testfile.txt

* Print only the lines between 8th and 11th line of a file

sed -n '8,11p' Testfile.txt

* Print only those lines having the word "Unix" from the file

sed -n '/Unix/'p Testfile.txt

* Print only those lines after the word/pattern "shopping" to the end of the file. Note this will include the line containing the word "shopping" as well.

sed -n '/shopping/,$p' Testfile.txt

In my next post, I'll try to cover some advanced printing examples using Sed. Stay tuned fellas.

Tuesday 2 February 2016

Maven - Offline Build

In order to execute a Maven build in offline mode, run the following command :

mvn -o install  OR  mvn --offline install.

In offline mode, Maven will not connect to the remote repository to check for the artifacts/dependencies. It will just check for the artifacts currently present in your local repository.

Hidden Screenshot Tricks on Mac OS X

Here's a quick guide to the keyboard shortcuts for taking screenshots on Mac OS X.
  • For capturing the entire screen press Command+Shift+3.
  • For capturing only the current active window press Command+Shift+4 and then the space bar and Return.
  • For capturing a specific limited region from the screen press Command+Shift+4 and choose the area by dragging the crosshairs.
Now here'a a small compilation of the hidden tricks of screenshots :
-----------------------
By default the screenshots are saved as a .png file on the desktop. For changing the default save location do the following.
Open Terminal and type the following for example :

defaults write com.apple.screencapture location /Users/IronCladWriter/Pictures

Make sure to replace the location path as desired.
-----------------------
If you want to change the image type from default .png to say .jpg, simply type the following :

defaults write com.apple.screencapture type jpg
-----------------------
To apply the above changes type in Terminal :

killall SystemUIServer
-----------------------

Alternatively you could fire up the Grab application, as seen in Other Utilities


Saturday 15 August 2015

Blog Reach

Guys, its been quite some time since being active on the blog. Hey, its just ONE post so far this year. And this is the second. After bringing in some articles last year, I almost went into hibernation with no new updates or new stuff. Hopefully I should make up for the lost time by bringing back some new articles during the remainder of the year.

Although the blog's been inactive for a while, it seems there is a consistent flow of traffic though. Number crunching time guys! I just saw the top 5 countries from where audiences visit the site.

1. US
2. Ukraine
3. Russia
4. France
5. India

Ukraine is the surprise addition to the top 5 list. Am actually quite surprised. Also lately there's a lot of traffic coming in from Russia as well. Good to see that the blog is being read so far and wide. Interesting! A lot of traffic also comes in from the UK, Canada, Germany, Poland, Australia.

At times I do wonder what about the Chinese? Why is there no traffic from China? Is it because of their great firewall? Are they totally cut-off from the rest of the world? What websites do they usually visit? Why don't they open up? Lots of questions in the head you see. Okay, I think I better stop this post right here. Lets keep this limited to just the blog reach. Until next time, ciao guys!

Monday 13 July 2015

True Detective - Season 2 - Fresh Impressions

Oh boy, its been more than a year of waiting for the season 2 of True Detective. The much awaited anthology series is finally back. Gentlemen, presenting my first introductory post for the fresh new season. Well to start with, I must honestly admit, the season one left quite indelible marks on our brains... the storyline, the script, the colorful characters were one of the finest. Comparison of the 2nd season with its predecessor is absolutely inevitable. I'll try to pen down the first honest impressions. Alright lets start with the assessment. Un dos tres ...

The very title song brings back the memories, with its colorful juxtaposed imagery. The choice of the title song 'Nevermind' by Leonard Cohen is debatable I guess. The song tries hard to differentiate itself from the previous one. Cohen's low and mildly raspy voice could be a hit or a miss. The texture of his voice is something that gets conditioned after years of countless singing sessions and regular intake of scotch whiskey :) The song however doesn't quite stand out and is not quite as catchy as the first season's "Far from any Road". I mean I was able to randomly hum the 1st season's tune maybe while taking a piss at a public toilet or standing in a queue. There was a recall value to it, but I can't quite do that with this season's song. Maybe because it just sounds a like a simple plaintext password. You know what I mean? Also,the first season's tune was just such a perfect choice to match with the contemplative philosophical mood of the script. Let's see how the season two story unfolds...

By the end of the first episode, you are pretty much introduced to the main star cast of the show, giving you a feel of its characters. Lets take a quick brief look at them.

Character 1 : There's Colin Farrell as the supposedly compromised detective Ray, who has gone through a divorce, is protective about his child and has an alcohol problem. He portrays a typical guy next door who's going through a mid-life crisis and resorts to alcoholism to escape the mess. Quite similar to Rust Cohle. Though I must say Connaughey pulled off the character with much ease, it seemed like effortless. Somehow, I feel people usually tend to empathize with and relate to the messed up protagonist. Farrell does try to play it natural with a good blink rate of eyes, pauses within the dialogues and a decent body language for the character. Yet it could have been better.


Character 2 : Then there's Rachel McAdams as detective Ani, who's kind of a mixed bag. I feel that as the series progresses, you might either love her or hate her. Her character reminds us that detectives are human as well after all. She gambles at night, has a one night stand with some policer officer and gets back to work the next day. Her character adds some femininity to the series unlike the masculine feel of season 1.


Character 3 : The next character is the patrolling officer Paul played by Taylor Kitsch. He is the guy who just loves biking on the highway, no mater what. On the personal front, he sees a girl, who has no idea what he does for a living, yet gives him a blowjob. So it seems like a relationship with no-strings-attached. Atleast for now. He too seems to be in some kind of a mess. I mean something seems to be eating him from within. Maybe thats why biking is such an emotional anchor for him to remain sane. Something seems to be bothering him, so much so that it leads to a self destructive moment like speeding up with headlights off on a dark highway at night. A perfect example of why you should never ride under stress. The speeding wind tricks our brain when stressed out.


Character 4 : The final important character is that of the 'supposedly' antagonist-with-a-heart Frank played by Vince Vaughn. His objectives are clear and every step that he takes seems to be be a step ahead in that direction. However his life also gets messed up when things don't quite work out for him. It seems someone is after Frank, someone who wants to fuck him up. The death of city manager Ben Casper sets the tone of it. Let's see how the story unfolds. But in general the choice of Vince for this character seems debatable. I remember the whole of internet was divided when it was officially announced that he'd be a part of the new season. I mean even now after 3 episodes, he comes across as an average criminal with basic intelligence. He seems to lack the cool-headed shrewdness to make it work, or maybe the script demands the character be like this. Anyways, fingers crossed. But one thing I believe is that this character could have been better performed by someone else more matured and seasoned. As far as Frank goes, one thing you can instantly notice about him is his fluctuating eyebrows.


Overall, by the end of episode 3, here's the flavor of my assessment : 
1. The lead characters seem to be messed up and withdrawn... maybe something on the lines of Ryan Gosling's in Drive.
2. The script seems to be weak and the plot seems to be thin, I mean it doesn't quite seem to be intricate like the previous one. The subtle clues seem be to missing. It seems a bit predictable at the moment. Though I may be wrong. Let's wait and watch :) I'll soon post an observation sheet of the small details, either relevant or irrelevant to the plot.
3. Lots of aerial shots of the LA freeways can be an eyesore at times. Ymmv. The season 1 showed shots of the Louisiana factories, remember?
4. There's a nice unique style to the overall look and feel of the new season though. The colors, the tones, the shades seem to be fitting the LA scenario.
5. Screw the point 5! Let's just enjoy the show :)

Guys, do let me know your thoughts, views, suggestions and opinions about the show. Ciao.

Saturday 11 October 2014

Contra video game for iPad

Guys do you remember the good old days playing classic games like Bomberman, Contra etc during the Atari & Sega console box days. I was recently so happy to see Contra ported to the iPad. I immediately downloaded it and have been playing it for quite some time now. 

For those who are unaware of the game, please note that this is a classic side scrolling shooter action game. In fact it is so addictive, I bet you would play even while commuting or just lazying around the couch. A bunch of weapons goodies like the laser gun, SL gun, SH gun, power shield make for an interesting experience. Also with each new level, the difficulty gets increasing proportionally. Honestly, there's nothing pathbreaking in this game, but play it just for the good old shooting fun. Aah the vintage classics!

Check out a few screenshots here :) This will definitely make you download it.






Monday 23 June 2014

Under the Dome - Season 1 Special FX

Well frankly speaking, after Breaking Bad got over I was looking for a new television series to get hooked to. That's when I came across this show "Under the Dome" showed on CBS. In fact, in about 7 days from today, the season 2 is slated to begin i.e. from June 30.

The show appealed to me, the moment I found that Dean Norris was a part of the star cast. Although apart from Dean Norris, the rest of the cast comprised of fresh faces with naive acting skills. The show's central premise is about a small town which is surrounded & covered by an invisible dome shield. The town is totally cut-off from the outside world. The story then revolves around the town's interesting adventures regarding the conservation of limited resources, brinkmanship, one-upmanship. It also covers earthly human themes like teamwork, pride, greed, cunningness, hidden agendas, internal politics etc.

This blog post today will only focus on the special FX elements of the show. I must admit the show's pilot episode did manage to catch my attention whereby I decided to follow-up all the remaining episodes. The pilot episode had some good eyeball-catching special FX, which piques one's interest. If you notice, all the next episodes feature a few seconds of the Episode 1 FX scenes before starting.

Here's a short list of some decent special effect scenes as follows :

Scene 1 : Episode 1 : A small private airplane like Cessna crashes on the dome. Good work here in showing the plane's parts being blown away while the debris falling on the ground.




Scene 2 : Episode 1 : The buffalo being cut into 2 pieces right in the middle. This one is a nice bloody scene where you actually see the the buffalo's spinal cord. Vegans might find this shot a bit offensive... probably :)




Scene 3 : Episode 1 : Sheriff Linda trying to communicate with her husband who's outside the dome. They try feel each other by touching the dome inside-out.




Scene 4 : Episode 8 : The scene where the egg turns pink. The scene about "The monarch will be crowned". Won't go much into the details here. Regular viewers might agree with me if they found this scene quite dumb and stupid, logic wise. If you're new to the series, these pics should arouse some curiosity I guess.




Lastly, I invite and encourage readers to post other FX scenes that I might have missed. Do post in your comments about what you feel about the show in general. Also drop in your expectations about the upcoming Season 2 & suggest plot ideas, twists etc. Happy viewing :)
Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker