Skip to content

Instantly share code, notes, and snippets.

@MatheusFaria
MatheusFaria / .vimrc
Last active April 19, 2018 12:53
VIM Configuration File
"Syntax Color
syntax on
"Line Number
set number
"Always in paste mode
"set paste
"Indentation whith Spaces

Virtual Box Guest Addtions pre-requiriments

For some one how is going to use the virtual box of Cent OS 6.4, and want to install the guest addtions

#!/bin/bash
# You must run with bash
#function nyan
#{
e='\033'
RESET="$e[0m"
BOLD="$e[1m"
CYAN="$e[0;96m"
@MatheusFaria
MatheusFaria / tempfile.py
Created February 1, 2017 16:52
Creates an editable temp file that will be removed on close
import os
class TempFile(object):
"""Creates an editable temp file that will be removed on close"""
def __init__(self, *args, **kwds):
self.args = args
self.kwds = kwds
def __enter__(self):
@MatheusFaria
MatheusFaria / GenerateDays.py
Created March 2, 2017 23:34
Generate the days given a start, an end, and the weekdays that should be considered
from datetime import timedelta
from datetime import date
one_day = timedelta(days=1)
today = date.today()
start_day = date(today.year, 3, 6)
end_day = date(today.year, 7, 17)
# Moday is 0 - Sunday is 6
@MatheusFaria
MatheusFaria / pokedex_ascii.h
Last active July 12, 2024 22:10
151 Pokemon ASCII Art
/**
* The ASCII arts were extracted from:
* - http://www.fiikus.net/?pokedex
* - http://www.world-of-nintendo.com/pictures/text/
* And also generated with:
* - http://www.text-image.com
*/
#ifndef __POKE_IMG__
#define __POKE_IMG__

APC

Material de apoio a disciplina de Algoritmos e Programação de Computadores da UnB - FGA

Moodle da disciplina.

Ambiente

  • Sistema Operacional: Ubuntu
  • Compilador: gcc (já vem por padrão no ubuntu)
@MatheusFaria
MatheusFaria / gdb-eda.md
Created August 22, 2017 20:49
Prática com o GDB

Prática com o GDB

Para executar o programa recursao.c :

$ make recursao
$ gdb ./recursao

Assim que executar o gdb, ele abrirá um terminal especial onde você pode inspecionar

@MatheusFaria
MatheusFaria / naiveblur.shader
Last active June 2, 2018 18:37
Unity Naive Blur Shader (This shader is slow!!!)
Shader "matheusfaria/NaiveBlur"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_Radius ("Blur Radius", Int) = 3
}
Category
{
@MatheusFaria
MatheusFaria / naiveedgedetection_sobel.shader
Created June 3, 2018 02:01
Unity edge detection using sobel filter naive implementation
Shader "matheusfaria/EdgeDetectionSobel"
{
Properties
{
_MainTex ("Base (RGB)", 2D) = "white" {}
_Threshold ("Threshold", Range(0, 1)) = 1
}
Category
{