Skip to content

Instantly share code, notes, and snippets.

View hvmonteiro's full-sized avatar

Hugo Monteiro hvmonteiro

View GitHub Profile
@hvmonteiro
hvmonteiro / Trace.pm
Last active June 20, 2019 22:05
Perl Debug trace messages (like sh -x ) (file: Trace.pm)
# -*- perl -*-
# This content should be added to a (new) file at ".../perllib/Devel/Trace.pm".
# Usage: perl -d:Trace <script.pl>
package Devel::Trace;
$VERSION = '0.12';
$TRACE = 1;
# This is the important part. The rest is just fluff.
@hvmonteiro
hvmonteiro / toolbar-custom_entries.js
Last active April 12, 2016 18:08
atom.io - package 'sync-settings' (file: toolbar-custom_entries.js)
module.exports = [{
type: 'button',
tooltip: 'New File',
callback: 'application:new-file',
icon: 'file-document',
iconset: 'mdi'
}, {
type: 'button',
tooltip: 'Open File',
callback: 'application:open-file',
@hvmonteiro
hvmonteiro / remote-shellcheck.bat
Last active April 12, 2016 18:34
Remote shellcheck execution through SSH (file: remote-shellcheck.bat)
@echo off
REM -- File: remote-shellcheck.bat
REM -- Author: Hugo Monteiro
REM -- URL: https://gist.github.com/hvmonteiro/b89c60a283c8c7469333/
REM -- Description: This script allows you to use shellcheck (bash shell syntax checker) that is installed
REM -- in a Linux machine, by connecting to it via SSH. IT worsk around the problem that shellcheck
REM -- no longer works on Windows.
REM -- Usage: you must use a windows command line SSH client (ex: cygwin ssh.exe command), generate
REM -- a SSH key for your windows, and add the *.pub key to your Linux ~/.authorized_keys so
REM -- that you are able to SSH to your Linux machine silently without prompting for a password.
@hvmonteiro
hvmonteiro / .vimrc
Last active April 13, 2016 00:37
Hvm's customized VIM configuration (file: ~/.vimrc)
"
" Author: Hugo Monteiro
" Description: Customized VIM settings with syntax checker using shellcheck and jshint (if installed)
" URL : https://gist.github.com/hvmonteiro/11fea54401063fc0e2033fd0a3be8c58
" Last Changed: 12-04-2016
" Notes: File to be used as ~/.vimrc
"
color desert
@hvmonteiro
hvmonteiro / .bashrc
Last active April 17, 2016 22:39
Bash Customized resource file (file ~/.bashrc)
EDITOR="vi"
PS1="\n\\[\\033[00m\\][\[\\033[01;37m\\]\\w\\[\\033[00m\\]]\\n[\\[\\033[01;32m\\]\\u\\[\\033[01;37m\\]@\\[\\033[01;33m\\]\h\\[\\033[00m\\]]\\\$ "
ATOM_NODE_URL="http://gh-contractor-zcbenz.s3.amazonaws.com/atom-shell/dist"
export PS1 EDITOR ATOM_NODE_URL
eval $( dircolors -b $HOME/.LS_COLORS )
alias ll="ls -l --color"
alias ls="ls --color"
alias mroe="more"
@hvmonteiro
hvmonteiro / .LS_COLORS
Created April 12, 2016 18:19
Hvm's customized Shell colors for bash (file: ~/.LS_COLORS)
# LS_COLORS
# Maintainers: Magnus Woldrich <m@japh.se>,
# Ryan Delaney <ryan.delaney@gmail.com> OpenGPG: 0D98863B4E1D07B6
# URL: https://github.com/trapd00r/LS_COLORS
# Version: 0.254
# Updated: Sun Jun 1 14:36:30 PDT 2014
#
# This is a collection of extension:color mappings, suitable to use as your
# LS_COLORS environment variable. Most of them use the extended color map,
# described in the ECMA-48 document; in other words, you'll need a terminal
@hvmonteiro
hvmonteiro / debug.lib
Created April 12, 2016 18:42
Bash Scripts
#!/bin/bash
DEBUG_FILE="debug.log"
LOG_FILE="info.log"
FAILURE=1
SUCCESS=0
# Outputs a message to the console
_print_msg () {
@hvmonteiro
hvmonteiro / .jshintrc
Last active March 1, 2018 12:44
Custom JSHint options (file: ~/.jshintrc)
{
"nocomma": false,
"esversion": 6,
"globals": [ {
"require": true,
"__dirname": true,
"process": true,
"module": true,
"console":, true
}]
@hvmonteiro
hvmonteiro / packages.cson
Created April 15, 2016 19:07
Atom.io Editor Packages (file: ~/.atom/packages.cson)
packages: [
"api-docs"
"atom-autocomplete-php"
"atom-beautify"
"atom-css-comb"
"atom-html-preview"
"atom-webbrowser"
"auto-detect-indentation"
"autoclose-html"
"autocomplete-html-entities"
@hvmonteiro
hvmonteiro / putty-hvm-settings.reg
Last active August 17, 2021 14:35
PuTTY Customized Settings
Windows Registry Editor Version 5.00
;
; Author: Hugo Monteiro
; Description: Customized puTTY settings
; URL : https://gist.github.com/hvmonteiro/6f1f2acd602c1db3c546fe30761a8d20
; Last Changed: 17-04-2016
; Installation: File to be imported/merged into Windows Registry
; Notes: LOCALE is configured to: ISO-8859-1:1998 (Latin-1, West Europe) - You can change it after import
;
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]