Skip to content

Instantly share code, notes, and snippets.

View byBretema's full-sized avatar
🎨
I make computers draw things!

Daniel Brétema byBretema

🎨
I make computers draw things!
View GitHub Profile
@byBretema
byBretema / Smooth_CV_Compiler.md
Last active February 9, 2017 15:36
Quick compile your OpenCV (in C/C++) project.

A smooth way to compile openCV C-based code.

Call example:

bash gcv.sh a_cv_main_file.c img1 img2 vid1

You can rename "gcv.sh" to "gcv" add it to the path and use like native compiler:

gcv a_cv_main_file.c img1 img2 vid1
@byBretema
byBretema / ATOM.md
Last active February 13, 2017 13:48
Made with ♥ for Atom.

Here you can see my atom's config files.

@byBretema
byBretema / OpenWithSublimeText3.bat
Last active March 23, 2024 01:19 — forked from cstewart90/OpenWithSublimeText3.bat
Open folders and files with Sublime Text 3 from windows explorer context menu (tested in Windows 10)
@echo off
SET st3_path=C:\Program Files\Sublime Text 3\sublime_text.exe
SET st3_label=Open with SublimeText3 !
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "%st3_label%" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3_path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3_path% \"%%1\"" /f
rem add it for folders
--enable-dom-distiller --flag-switches-begin --enable-new-bookmark-apps --enable-canvas-2d-dynamic-rendering-mode-switching --enable-embedded-extension-options --enable-es3-apis --enable-fast-unload --enable-google-branded-context-menu --google-profile-info --enable-grouped-history --enable-nacl --new-profile-management --disable-password-generation --enable-site-settings --enable-tab-audio-muting --ignore-gpu-blacklist --enable-lcd-text --enable-overlay-scrollbar --save-page-as-mhtml --saveas-menu-label --secondary-ui-md --show-saved-copy=primary --enable-smooth-scrolling --enable-features=AutomaticTabDiscarding,ExpensiveBackgroundTimerThrottling,MaterialDesignExtensions,MaterialDesignHistory,MaterialDesignSettings,MaterialDesignUserMenu,PreferHtmlOverPlugins,ScrollAnchoring,WebRTC-H264WithOpenH264FFmpeg --disable-features=RunAllFlashInAllowMode,SafeSearchUrlReporting,enable-manual-password-generation,enable-password-force-saving --flag-switches-end
@byBretema
byBretema / arch_guide.sh
Created March 7, 2017 02:25
[WIP] guide to config arch linux.
loadkeys es # Cambiamos el teclado a español.
efivar -l # Si esto devuelve algo, estamos corriendo bien sobre UEFI ;)
timedatectl set-ntp true # Habilita el cambio del horario de verano.
timedatectl set-timezone Europe/Madrid # Estable la hora de tu zona.
# Particiones a gusto del consumidor, via Ncurses.
cgdisk
# Damos formato a las particiones antes creadas, definiendo tambíen su LABEL.
mkswap -L AL_SWAP /dev/sdaW
@byBretema
byBretema / deques.py
Last active June 7, 2017 14:29
How to avoid 'deques' pointer-like behaviour...
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
from collections import deque
if __name__ == '__main__':
''' Creamos las deques con las que trabajaremos. '''
# DobleCola que queremos pasar como argumento.
a = deque()
# DobleCola que recibira 'a' como 'puntero'.
@byBretema
byBretema / collatz.py
Last active May 9, 2017 14:03
COLLATZ: functions VS lambdas.
# Lambda way...
L_Collatz = lambda n : [] if n == 1 else \
[n / 2] + L_Collatz(n / 2) if n % 2 == 0 else \
[3 * n + 1] + L_Collatz(3 * n + 1)
# Function way...
def F_Collatz(n):
if n == 1:
return []
elif n % 2 == 0:
On Windows,
Install mingw-w64 from Mingw-builds
- Version: latest (at time of writing 6.3.0)
- Architecture: x86_64
- Threads: win32
- Exception: seh
- Build revision: 1
- Destination Folder: Select a folder that your Windows user owns
@byBretema
byBretema / extensions.json
Last active August 5, 2018 10:35
Visual Studio Code Settings Sync Gist
2gua.rainbow-brackets
bbenoist.Doxygen
CADENAS.vscode-glsllint
christian-kohler.path-intellisense
cschlosser.doxdocgen
dbaeumer.vscode-eslint
Gimly81.matlab
James-Yu.latex-workshop
kevinehmry.heatscript
kriegalex.vscode-cudacpp
@byBretema
byBretema / emoji.cpp
Last active March 30, 2018 11:30
A simple and maybe illustrative cpp example with a class and a main.
#include <stdio.h> // <--- printf()
#include <string>
#include <vector>
// using namespace std; // <--- Never !
/* EMOJI CLASS */
class emoji
{
public: