Skip to content

Instantly share code, notes, and snippets.

View RDCH106's full-sized avatar
Partially offline. No time...

Rubén de Celis Hernández RDCH106

Partially offline. No time...
View GitHub Profile
@RDCH106
RDCH106 / flash.sh
Last active March 29, 2017 15:20 — forked from iBet7o/description.md
Color del texto en scripts bash
#! /bin/bash
# Variables
# ------------------------------------------------------------------------------
txtSuccess='\033[1;32m'
txtError='\033[0;31m'
txtNoColor='\033[0m'
@RDCH106
RDCH106 / rename.sh
Last active March 29, 2017 15:21 — forked from iBet7o/description.md
Script bash para renombrar directorios y archivos
#! /bin/bash
source flash.sh
# Variables
# ------------------------------------------------------------------------------
pathLog=`echo $(pwd)/log.txt`
echo -n "Path to rename: "
@RDCH106
RDCH106 / Factory_pattern.cpp
Last active March 14, 2017 15:24
In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method.
#include <iostream>
#include <memory>
#include <string>
struct Base
{
virtual ~Base() = default;
};
struct Derived : public Base
@RDCH106
RDCH106 / .codacy-pylintrc
Created November 16, 2016 14:41
PyLint configuration using defaults PyLint values from Codacy
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook=
# Add files or directories to the blacklist. They should be base names, not
@RDCH106
RDCH106 / codacy-python-default-conf.json
Created November 16, 2016 14:22
Default review criteria for a Python project in Codacy
{
"patterns" : [{
"patternId" : "Custom_Scala_NonFatal",
"enabled" : true
}, {
"patternId" : "CSSLint_shorthand",
"enabled" : true
}, {
"patternId" : "CSSLint_errors",
"enabled" : true
@RDCH106
RDCH106 / ANSIColorFix.py
Created October 5, 2016 10:06
ANSI Colors Fix for Python in Windows
import os
import platform
if os.name == 'nt' and platform.release() == '10' and platform.version() >= '10.0.14393':
# Fix ANSI color in Windows 10 version 10.0.14393 (Windows Anniversary Update)
import ctypes
kernel32 = ctypes.windll.kernel32
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)
@RDCH106
RDCH106 / win10colors.cmd
Created October 4, 2016 10:23 — forked from mlocati/win10colors.cmd
ANSI Colors in standard Windows 10 shell
@echo off
cls
echo  STYLES 
echo ^<ESC^>[0m Reset
echo ^<ESC^>[1m Bold
echo ^<ESC^>[4m Underline
echo ^<ESC^>[7m Inverse
echo.
echo  NORMAL FOREGROUND COLORS 
echo ^<ESC^>[30m Black (black)
@RDCH106
RDCH106 / OpenCV_Mouse_Event_Handler_2.cpp
Last active June 19, 2020 12:17
OpenCV Mouse Event Handler 2
#include "opencv2/opencv.hpp"
#include <iostream>
using namespace cv;
using namespace std;
Mat frame;
void mouseEventHandler(int event, int x, int y, int flags, void* param)
{
@RDCH106
RDCH106 / motd
Created April 20, 2016 09:36
MOTD example with ASCII Art
_ __________ _,
_.-(_)._ ." ". .--""--. _.-{__}-._
.'________'. | .--------. | .' '. .:-'`____`'-:.
[____________] /` |________| `\ / .'``'. \ /_.-"`_ _`"-._\
/ / .\/. \ \| / / .\/. \ \ || .'/.\/.\'. | /` / .\/. \ `\
| \__/\__/ |\_/ \__/\__/ \_/| : |_/\_| ; | | \__/\__/ |
\ / \ / \ '.\ /.' / .-\ /-.
/'._ -- _.'\ /'._ -- _.'\ /'. `'--'` .'\/ '._-.__--__.-_.' \
/_ `""""` _\/_ `""""` _\ /_ `-./\.-' _\'. `""""""""` .'`\
(__/ '| \ _)_| |_)_/ \__)| ' | |
@RDCH106
RDCH106 / test_call-VS-start.bat
Last active February 8, 2016 08:59
Windows .BAT script for testing differences between CALL and START
@ECHO OFF
ECHO Execution using CALL
ECHO -------------------------------------------
ECHO Main execution running...
ECHO Calling to ping...
call ping google.es
ECHO.
ECHO Continue main execution