get in touch w/ IT via woowie

Vanilla.js class methods

jQuery's addClass, hasClass, removeClass and toggleClass methods are very useful, but sometimes, we do not want to import jQuery, but we would like to use these methods. In this post, i will share these little snippets to replace jQuery's methods with them.

Tags: jquery and vanillajs

Scan opened ports with netcat

$ nc -z -w1 localhost 10-8000

If we want to get additional information about opened ports

$ echo “” | nc -v -w1 localhost 10-50
Tags: cli and netcat

Raspberrypi

The Raspberry Pi is a credit-card sized computer that plugs into your TV and a keyboard. It is a capable little computer which can be used in electronics projects, and for many of the things that your desktop PC does, like spreadsheets, word-processing and games It also plays high-definition video. We want to see it being used by kids all over the world to learn how computers work, how to manipulate the electronic world around them, and how to program.

Tags: raspberrypi, rpi, and smarthome

Parameterized event handlers

I found an interesting issue today, while coding some educational stuff at my work. The excercise was really simple, and easy, so i finished it fast. The task was to attach some click events to a bunch of buttons, and make a location forward in the handler. The target url was queried. First, i made some really basic event listeners with anonimous handlers, and to be honest these made their job well. However, i made my mind around, and realized, that attaching anonimous event handler functions in a loop is not memory friendly, becouse in every loop i create a new function object, instead using only one (i.e polluting the GC). I really wanted to solve this issue, despite it was not important to think about memory issues.

Tags: bind and events

Object property as "not a string" value

JavaScript objects with !string keys issue. Worth a look.

Tags: interesting and object