Skip to content

Instantly share code, notes, and snippets.

View ildar-shaimordanov's full-sized avatar

Ildar Shaimordanov ildar-shaimordanov

View GitHub Profile
ildar-shaimordanov /
Last active March 13, 2024 12:16 — forked from Khoulaiz/gist:41b387883a208d6e914b
Checking ports without telnet

Here are several different ways to test a TCP port without telnet.

$ cat < /dev/tcp/

$ cat &lt; /dev/tcp/

Once I decided weirdly to combine two commands into a single one with possibility to keep the command line options of the both commands. It was assumed the following:

# original and simple usage
command1 options1 | command2 options2

# modified and weird one
super_command options1 -- options2
ildar-shaimordanov /
Last active August 6, 2023 18:55
Print last starting entries found in all available log files

Print last starting entries found in all available log files

There are two kinds of magic: black and white. Take one spell:

  • Gandalf's formulae use white magic of awk or perl
  • Saruman's formulae use black magic trickily blending grep, sed, awk, tac and sort


  1. process files FILE_PATTERN
ildar-shaimordanov /
Last active September 6, 2022 15:47
examples for making cuts of lightnings
ildar-shaimordanov /
Last active March 27, 2021 13:45
trap_ping for parallel pinging
# trap_ping 'commands' [ping-options] < file-with-hosts
# Parallelize pinging the network hosts and execute the specified shell
# commands if one of the hosts is not reachable.
# Any ping options are allowed; defaults to -n -c 1.
# Environment
ildar-shaimordanov /
Last active April 24, 2023 07:26

Shell hybrids

Math.uuid.js (v1.4)
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.

List of downloaders

ildar-shaimordanov / Get-IniContent.ps1
Created August 31, 2018 17:51 — forked from hsmalley/Get-IniContent.ps1
Powershell to/from INI Files
function Get-IniContent ($filePath)
$ini = @{}
switch -regex -file $FilePath
"^\[(.+)\]" # Section
$section = $matches[1]
$ini[$section] = @{}
$CommentCount = 0
#!/usr/bin/env perl
# another solution by this link
use strict;
use warnings;
sub decamelize {
my $s = shift;