Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Ruby net-scp cannot scp multiple files with asterisk(*)

net-ssh/net-scp is a Ruby gem which can be used to scp files between different *nix machines. It's similar to how the *nix scp command. It can be used to scp a file or a directory. However, it seems it has some problem to scp multiple files using pattern *.For example, below script is supposed to download all files from remote directory to local directory:require 'net/scp'host = 'testmachine'login = 'testaccount'password = "testpassword"remote_path = '/tmp/remote_dir/*'Net::SCP.start(host, login, :password => password) do |scp| scp.download(remote_path, '.')endThe...

4,986 7       RUBY NET-SCP ASTERISK MULTIPLE FILES


  Format JSON data on Ubuntu

JSON now becomes a very popular data format because of its simplicity and light-weight. Nowadays many RESTful APIs will offer a choice of exchanging JSON data between the server and client. Sometimes the data may not be formatted and it cannot be easily read by human beings. It's frequently desired that the unformatted JSON data should be formatted before read.Today we will show a few ways to format JSON data on Ubuntu. Assume we have a json file test.json with below content.{ "title": "Test", "description": "Sample description" }The normal cat command will output below content.postman@postman...

25,603 1       UBUNTU LINUX RUBY PYTHON NODEJS PERL JSON JQ YAJL


  Why does LinkedIn migrate to NodeJS from Ruby?

Node.js, the server-side JavaScript-based software platform used to build scalable network applications, has been all the rage among many developers for the past couple of years. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. Because of these advantages, there are many websites are migrating to Node.js.One of them is LinkedIn.LinkedIn was initially built on Ruby which contained 60K lines of code, later in 2011, LinkedIn started to rebuild their core mobile servi...

15,826 0       RUBY LINKEDIN NODEJS


  C++, Ruby and CoffeeScript complexity comparison

There are many programming languages around the world, they all designed to help programmer solve some problems, finish some tasks. These languages are often divided into different types, there are structural, object-oriented, functional, scripting languages etc. Some are easy to pick up such as Java, while some are thought to be difficult to learn such as C++. So how do we understand complexities of different programming languages?Many people agree that C++ is very complex languages, it has pointers, templates, multiple inheritance etc. But how complex is it? C++ Rocks made some comparisons o...

7,860 0       RUBY COMPLEXITY COFFEESCRIPT LANGUAGES C++


  Microsoft wakes up to Open Source … in a big way!

Contrary to popular belief, Microsoft loves open-source. No, really! Don’t believe me? Read on: Today, Microsoft announced that it is open-sourcing all of its flagship web/cloud platform: ASP.NET MVC Web Pages (aka Razor), Web API. Importantly … these projects will be publicly hosted and that the team will continue development in the open (you’ll be able to view the repository and see the code commits as they happen) and that Microsoft will even consider code submissions, fixes, improvements & features contributed by 3rd parties. This isn’t th...

2,541 0       MICROSOFT RUBY OEPN SOURCE


  Gracefully exiting from console programs in Ruby

Imagine you write a CLI program or a Rake task which loops through some data performing some work on it. You run it and then you remembered something. You’d love to kill the process with ctrl-c, but that will raise an exception somewhere in the loop. What you want is for the iteration to complete and then you want the program to quit.You could handle the Interrupt exception or add some conditions. But how about a cleaner and reusable way?No problem - you can trap signals, which means we can trap the ctrl-c (which is an INT signal). Servers, like unicorn, use signals for graceful restart...

6,310 0       RUBY CONSOLE EXIT COMMAND WINDOW GRACEFUL


  Why I switched from Ruby back to C++

After two months of Sol Trader development in Ruby, I took a difficult decision last Wednesday morning: I’ve decided to rewrite the game code from scratch in C++. Let me explain my reasons. If you'd like to receive announcements about Sol Trader or be part of the beta program, sign up at soltrader.net.Why I did itSlow frames: When working with Ruby, I use the excellent Gosu library to do all my game specific coding. This initially worked great, but occasionally I’d just get slow frames coming up. My game is timed to run at 60 frames per second, which means that each frame should...

2,481 0       C++ RUBY ADVANTAGE FEATURE


  Never create Ruby strings longer than 23 characters

Looking at things through a microscopesometimes leads to surprising discoveriesObviously this is an utterly preposterous statement: it’s hard to think of a more ridiculous and esoteric coding requirement. I can just imagine all sorts of amusing conversations with designers and business sponsors: “No… the size of this <input> field should be 23… 24 is just too long!” Or: “We need to explain to users that their subject lines should be less than 23 letters…” Or: “Twitter got it all wrong… the 140 limit should have been 23!â€...

2,426 0       RUBY OPTIMIZATION SPECIFICATION STRING INTERPRETER 23