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 / 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 / commit-msg.sh
Last active May 16, 2022
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 / 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

@silvioprog
silvioprog / configurar_pyenv.md
Created Nov 3, 2021 — forked from luzfcb/configurar_pyenv.md
instalar pyenv no ubuntu
View configurar_pyenv.md

baseado no meu outro tutorial https://gist.github.com/luzfcb/1a7f64adf5d12c2d357d0b4319fe9dcd

Use o pyenv https://github.com/pyenv/pyenv para baixar, instalar e gerenciar múltiplas versões do INTERPRETADOR Python na sua maquina.

Primeiro instale as dependências:

Linux (Ubuntu):

Abra um terminal, apertando o atalho CRTL + ALT + T ou digite aperte a tecla do windows e digite terminal, ou clique com o botão direito na tela, e escolha a opção "Abrir Terminal" (somente para Ubuntu 15.10 ou superior, para 14.04 é necessário instalar o pacote nautilus-open-terminal e reiniciar)