Skip to content

Instantly share code, notes, and snippets.

View woile's full-sized avatar

Santiago Fraire Willemoes woile

View GitHub Profile
@woile
woile / gist:5806185
Last active December 18, 2015 15:39
int i;
void main(){
PORTB=0x00; //Inicialización.
TRISB0_bit=0; //RB0 como salida.
PWM1_Init(4000); //Frecuencia PWM.
@woile
woile / app_name.py
Last active January 24, 2022 08:52
Custom logging for django with colors in console
logger = logging.getLogger(__name__)
logger.debug("bla bla")
logger.info("bla bla")
logger.warning("bla bla")
logger.error("bla bla")
logger.critical("bla bla")
@woile
woile / get_cuil_cuit.js
Last active September 20, 2022 11:30
Permite calcular / generar el cuil / cuit de una persona. Testeado con 3800 muestras, de las cuales fallaron solo 22 (casos exepcionales)
function getCuilCuit(document_number, gender) {
/**
* Cuil format is: AB - document_number - C
* Author: Nahuel Sanchez, Woile
*
* @param {str} document_number -> string solo digitos
* @param {str} gender -> debe contener HOMBRE, MUJER o SOCIEDAD
*
* @return {str}
**/
@woile
woile / designer.html
Created December 10, 2014 17:22
designer
<link rel="import" href="../core-ajax/core-ajax.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@woile
woile / designer.html
Created December 10, 2014 17:48
designer
<link rel="import" href="../notification-elements/notification-alert.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@woile
woile / upgrade-sys
Last active September 2, 2021 14:44
Shell command to correctly update system
#!/bin/bash
sudo apt -y autoremove &&
sudo apt install -y --fix-broken &&
sudo apt update &&
sudo apt -y upgrade -f &&
sudo apt -y dist-upgrade -f &&
sudo apt install -y --fix-broken &&
sudo dpkg --configure -a &&
sudo apt -y autoremove -f &&
sudo aptitude purge -y '~c' &&
@woile
woile / .jshintrc
Created July 1, 2015 18:22
Web development configuration for jslint
{
// JSHint Default Configuration File (as on JSHint website)
// See http://jshint.com/docs/ for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
@woile
woile / sources.list
Last active December 4, 2019 13:59
Debian testing sources
#------------------------------------------------------------------------------#
# OFFICIAL DEBIAN REPOS
#------------------------------------------------------------------------------#
###### Debian Main Repos
deb http://deb.debian.org/debian/ testing main contrib non-free
deb-src http://deb.debian.org/debian/ testing main contrib non-free
deb http://deb.debian.org/debian-security testing-security main contrib non-free
deb-src http://deb.debian.org/debian-security testing-security main contrib non-free
@woile
woile / add_gnome_extensions.sh
Last active September 2, 2021 14:46
My personal conf when installing debian
#!/bin/bash
# Add my custom gnome extensions
# Execution:
# sudo chmod +x add_gnome_extensions.sh
# ./add_gnome_extensions.sh
cd /tmp
wget https://raw.githubusercontent.com/NicolasBernaerts/ubuntu-scripts/master/ubuntugnome/gnomeshell-extension-manage
chmod +x gnomeshell-extension-manage
./gnomeshell-extension-manage --install --extension-id 1011 # Dynamic panel transparency
@woile
woile / _conkyrc
Created December 1, 2016 14:02
Conky custom cfg
conky.config = {
-- Set to yes if you want Conky to be forked in the background
background = true,
-- Use Xft
use_xft = true,
-- Xft font when Xft is enabled
font = 'Bitstream Monospace:size 9',