Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🏫

Rafael Corsi rafaelcorsi

👨‍🏫
View GitHub Profile
@rafaelcorsi
rafaelcorsi / gist:f475bf658ad6dc8958e3
Created Mar 6, 2015
Export the drawn from a pdf using inkscape and command line
View gist:f475bf658ad6dc8958e3
#!/bin/bash
# License under GLP 2
# uses inkscape to export only the drawn from a PDF
FILE1=$1
inkscape \
--without-gui \
--file=$1 \
-D --export-pdf=$1
View gist:fb7dd603249a104c86e927b821ee4b01
/**************************************************************************
* Rafael Corsi - Insper
* rafael.corsi@insper.edu.br
*
* Computação Embarcada
*
* 08-PIO-ENTRADA
************************************************************************/
View toMIF.py
# Rafael Corsi @ insper.edu.br
# Dez/2017
# Disciplina Elementos de Sistemas
#
# Convert program memmory to altera mif file
# that can be used to load FPGA and to Simulate (modelsim)
# http://quartushelp.altera.com/13.0/mergedProjects/reference/glossary/def_mif.htm
#
# TODO:
View timelaps
ffmpeg -r 24 -f image2 -start_number 4571 -i G003%d.JPG -s hd1080 -vcodec libx264 timelapse.mp4
@rafaelcorsi
rafaelcorsi / AtmelStudio7-make-to-linux.sh
Last active May 29, 2020
Convert Atmel Studio 7 generated makefile (windows paths) to linux, so you can compile your project from linux
View AtmelStudio7-make-to-linux.sh
#!/bin/sh
# Rafael Corsi
# corsiferrao@gmail.com
#
# Script to convert makefile generate from atmel studio 7 (windows)
# to linux path, assuming that you have gcc on PATH
#
# on Arch
# - sudo pacman -S arm-none-eabi-gcc
View code.comp.java
/**
* Retorna o código binário do mnemônico para realizar uma operação de cálculo.
* @param mnemnonic vetor de mnemônicos "instrução" a ser analisada.
* @return Opcode (String de 8 bits) com código em linguagem de máquina para a instrução.
*/
public static String comp(String[] mnemnonic) throws InvalidCompException {
int movInt = 0;
if ( mnemnonic.length == 0 || mnemnonic[0].equals("")) {