Skip to content

Instantly share code, notes, and snippets.

@icarofreire
icarofreire / modulo_dev.c
Last active August 29, 2015 14:20
comunicação com espaço de usuário e espaço de kernel.
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@icarofreire
icarofreire / log.php
Created June 25, 2015 14:36
Classe para criar um arquivo de log no sistema.
<?php
/*
* Classe para criar um arquivo de log do sistema.
* para debugar o programa ou deixar um logger no sistema.
*
* Ex: log::w( <variavel ou array> );
* */
class log
@icarofreire
icarofreire / gist:cdb435f92655406ea43f
Last active August 29, 2015 14:24
Device driver de acesso ao PCI.
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@icarofreire
icarofreire / trei_device.c
Created October 27, 2015 04:50
Passando parâmetros para o módulo do kernel.
#include <linux/module.h>
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <linux/fs.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <asm/io.h>
#include <asm/uaccess.h>
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package joimages;
import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Frame;
//$Id: helloworld.cc 836 2007-05-09 03:02:38Z jjongsma $ -*- c++ -*-
/* gtkmm example Copyright (C) 2002 gtkmm development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@icarofreire
icarofreire / .vimrc
Last active July 21, 2017 07:22
Configurações do vimrc
"*************************************************
"Configurações do vimrc;
"map - funciona em qualquer modo;
"nmap - apenas no modo Normal;
"imap - apenas no modo de Inserção;
"% => Nome do arquivo atual com extensão;
"%< => Nome do arquivo atual sem extensão;
":p => Arquivo atual com seu caminho completo;
@icarofreire
icarofreire / livros-para-comprar.txt
Last active December 15, 2024 18:51
Lista de livros para comprar
Lista de livros para comprar:
+ Meridiano de Sangue - Cormac McCarthy. [R$ 57.90]
+ O Mundo como Vontade e Como Representação - Arthur Schopenhauer. [Editora CONTRAPONTO ou UNESP]
++ Como a Mente Funciona - Steven Pinker. [Editora: Companhia das Letras]
+ Uma história natural da curiosidade - Alberto Manguel. [R$ 62,90]
+ Cronologia das Ciências e das Descobertas - Isaac Asimov
+ Rápido e Devagar: Duas Formas de Pensar - Daniel Kahneman [R$ 48,93]
+ Breve história de quase tudo - Bill Bryson. [R$ 66,63] (Amazon);
@icarofreire
icarofreire / .emacs
Last active February 12, 2018 00:26
Arquivo de configuração do Emacs.
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(column-number-mode t)
'(custom-enabled-themes nil)
'(line-number-mode nil))
(custom-set-faces
;; custom-set-faces was added by Custom.
@icarofreire
icarofreire / similar_acejump.vim
Last active July 19, 2017 06:48
similar to acejump
" ACEJUMP
" Based on emacs' AceJump feature (http://www.emacswiki.org/emacs/AceJump).
" AceJump based on these Vim plugins:
" EasyMotion (http://www.vim.org/scripts/script.php?script_id=3526)
" PreciseJump (http://www.vim.org/scripts/script.php?script_id=3437)
" Type AJ mapping, followed by a lower or uppercase letter.
" All words on the screen starting with that letter will have
" their first letters replaced with a sequential character.
" Type this character to jump to that word.