- htttp://www.hugovmonteiro.net
- https://orcid.org/0009-0006-7405-6746
- hvmonteiro
- https://buymeacoffee.com/hvmonteiro
- https://dev.to/hvmonteiro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WARNING : Unauthorized access to this system is forbidden and will be | |
prosecuted by law. By accessing this system, you agree that your actions | |
may be monitored if unauthorized usage is suspected. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Author: Hugo Monteiro | |
# Description: Atom Editor snippets for Bash Shell Scripting | |
# URL : https://gist.github.com/hvmonteiro/4c4df4afd0f4d5908d5be890071b74c1 | |
# Last Changed: 19-04-2016 | |
# Installation: File to be copy/pasted into Atom Editor snippets configuration file | |
'.source.shell': | |
# function to print a message and exit with an error | |
'function exit_with_error': |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Look and feel | |
hardstatus alwayslastline "%-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%<" | |
# Number of output lines saved that can be scrolled | |
defscrollback 20000 | |
# Status bar | |
caption always "%{= bb}%{+b w}Screen: %n | %h %=%t %c" | |
#caption always '%{-b}%{= wb}%-Lw%{= wr}%{+b}%n%f %t%{= wb}%{-b}%+Lw %{= wr} %=%c %d-%m-%Y' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
umask 0002 | |
eval "$( dircolors -b "$HOME/.LS_COLORS" )" | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" Author: Hugo Monteiro | |
" Description: Customized VIM settings with syntax checker, highlighting nad error follow up | |
" and jshint (if installed) | |
" Last Changed: 01-03-2018 | |
" Notes: File to be used as ~/.vimrc | |
" | |
"color desert | |
"color darkblue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**************************************************************************/ | |
/*************************************************************************** | |
HELLOSERVER.C - a 'Hello World' TCP/IP based server daemon | |
Implements a skeleton of a single process iterative server | |
daemon. | |
Wherever possible the code adheres to POSIX. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<NotepadPlus> | |
<UserLang name="Log4J" ext="log" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="2" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">00 01 02 03 04</Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2"></Keywords> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# WARNING: This configuration file is only suitable for usage in development environments on private networks, | |
# as it supresses and works around most information messages about SSH related security issues! | |
# | |
# Always authenticate with user 'root' | |
Host * | |
User root | |
# Automatically add remote host keys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const download = require('electron-download'); | |
var downloadVersion = '1.4.15'; | |
if (process.argv > 2) { | |
var downloadVersion = process.argv[2]; | |
console.log('Using specified version', downloadVersion, '...'); | |
} else { | |
console.log('Version', process.argv[2], 'using default', downloadVersion, '...'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy/paste directly into bash shell or source a file with the function below: | |
# --- cut here --- | |
is_tcp_port_active () { | |
if [ "$1" == "" -o "$2" == "" ]; then | |
echo -e "\n usage: is_tcp_port_active <hostname> <port>\n" | |
return 1 | |
fi | |
HOST=$1; | |
PORT=$2; | |
echo "$HOST:$PORT"; |