Skip to content

Instantly share code, notes, and snippets.

Avatar
🎵

silvioprog silvioprog

🎵
View GitHub Profile
@silvioprog
silvioprog / epoll_sock.c
Last active Sep 13, 2015 — forked from vndmtrx/epoll_sock.c
Socket não bloqueante com notificação de eventos usando epoll()
View epoll_sock.c
/* Copyright 2012 Eduardo Rolim
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@silvioprog
silvioprog / commit-msg.sh
Last active Sep 5, 2019
Spell checking for git commit message using aspell(1).
View commit-msg.sh
#!/bin/sh
#
# This file is distributed under Public domain.
#
# Author: silvioprog.
#
# Installing:
#
# - `$ mv commit-msg.sh .git/hooks/commit-msg`
# - `$ chmod +x .git/hooks/commit-msg`
@silvioprog
silvioprog / cp1252_to_utf8.c
Last active Sep 6, 2019
Convert encoding of given string from CP1252 to UTF-8 in C using iconv(3).
View cp1252_to_utf8.c
/* Public domain */
/* Author: silvioprog */
/*
Build and test:
$ gcc cp1252_to_utf8.c
$ ./a.out
A função atou() é incrível!
@silvioprog
silvioprog / Digispark.md
Created Dec 15, 2020 — forked from Ircama/Digispark.md
Configuring the Digispark ATtiny85 board for Arduino IDE and upgrading the bootloader
View Digispark.md

Configuring the Digispark ATTINY85 board for Arduino IDE and upgrading the bootloader

This note describes the configuration of an ATtiny85 based microcontroller development board named Digispark and similar to the Arduino line. It is available in many online marketplaces for roughly 1 dollar (e.g., Ebay, Amazon, AliExpress) and is shipped fully assembled, including a V-USB interface (a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers). Coding is similar to Arduino: it uses the familiar Arduino IDE and is already provided with a ready-to-use bootloader (fully integrated with Arduino), also allowing to be upgraded. Comparing it with the [ATmega328P](ht