Skip to content

Instantly share code, notes, and snippets.

View beigna's full-sized avatar
🐍

Ignacio Benedetti beigna

🐍
  • Argentina
View GitHub Profile
@beigna
beigna / FireQOS @ OpenWRT
Last active October 14, 2015 20:28
FireQOS: 10mpbs/1mps fiber at home
DEVICE=eth0.2
INPUT_SPEED=9600kbit
OUTPUT_SPEED=960kbit
interface $DEVICE world-in input rate $INPUT_SPEED #balanced
class interactive commit 20%
match udp sport 53
match tcp port 22
match icmp
match tcp sports 5222,5228
# -*- coding: utf-8 -*-
from decimal import Decimal
from fractions import Fraction
from lineal import numero
try:
entrada = raw_input
except:
entrada = input
@beigna
beigna / lineal.py
Last active August 29, 2015 14:01
Resolución de ecuaciones lineales
# -*- coding: utf-8 -*-
from decimal import Decimal
from fractions import Fraction
try:
entrada = raw_input
except:
entrada = input
@beigna
beigna / gist:9147465
Created February 22, 2014 01:54
Vim y gVim
.vimrc
------
syntax on
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent
set ruler
set hlsearch
@beigna
beigna / gist:8151015
Last active January 1, 2016 13:28
Ejemplo de Cartero loco
Trackeo internacional
$ python correo.py RGxxx606xxxDE
Buscando información para: RGxxx606xxxDE ...
+-------------------+-----------+--------------------+------------------------------------------+--------+--------+
| Fecha | País | Oficina | Evento | Motivo | Acción |
+-------------------+-----------+--------------------+------------------------------------------+--------+--------+
| 13-Dec-2013 11:07 | GERMANY | | Receive item from customer (Otb) | | |
| 16-Dec-2013 12:08 | GERMANY | | Insert item into bag (Otb) | | |
| 17-Dec-2013 07:00 | GERMANY | | Send item abroad (EDI-received) | | |
@beigna
beigna / cartero_loco.py
Last active March 3, 2017 18:14
Consulta de seguimiento del Correo. Ejemplo: https://gist.github.com/nachopro/8151015
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
from HTMLParser import HTMLParser
from datetime import datetime
from BeautifulSoup import BeautifulSoup
from prettytable import PrettyTable
import requests
@beigna
beigna / gist:7533030
Created November 18, 2013 18:41
Recordando C
#include <stdio.h>
#define PIN1 128
#define PIN2 129
#define PIN3 254
#define PIN4 255
int canal_a[2] = {PIN1, PIN2};
int canal_b[2] = {PIN3, PIN4};
@beigna
beigna / gist:7401877
Last active December 27, 2015 22:49
Puteando con las interrupciones!
#include <16f84a.h>
#fuses NOWDT
#use delay(crystal=4MHz)
#use fast_io(b)
byte previous_b = 0b00000000;
int16 timeout = 1000;
boolean is_interruptable = true;
#include <16f84a.h>
#fuses XT,NOWDT
#use delay(clock=4000000)
void main(){
set_tris_B(0b00000000);
while (True){
output_B(0b00000001);
delay_ms(500);
@beigna
beigna / gist:6207351
Created August 11, 2013 23:25
SpeedFan profile for Sapphire HD 7850 2GB OC DDR5 (Quiet and Secure operation) http://www.sapphiretech.com/presentation/product/?cid=1&gid=3&sgid=1160&pid=1672&psn=&lid=1&leg=0
xxx FanControllerTemp from FanController 0
temp=1 from ATI Video Card@$0(onISA@$290)
MinTemp=30
MaxTemp=70
hysteresis=2
ControlPoints=20 20 20 22 24 26 28 30 35 40 45 50 60 65 70 75
xxx end