USB fuse bypass for RPi B rev. 0003

My raspberry pi didn’t supply enough current to the connected usb devices and I didn’t want a usb hub so something had to be done.. Got the idea from Larry_Adlards post (Sun Jun 17, 2012) to raspberrypi.org/forums/viewtopic.php?f=63&t=8591 but since my rev 3 board did not have polyfuses F1 and F2 (they were shorted) I had […]

Two network adapters, how to change the preferred (Windows)?

It’s decided by the Gateway metric. In my case I want to make the first one the preferred one, so I have to change the “InterfaceMetric: 20” to a value smaller than 10. C:\Users\Filip>route print IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.107 10 0.0.0.0 0.0.0.0 10.1.1.1 […]

10 bit PWM on ATmega32u4 (ex. Arduino Micro)

Some magic is required to get 10 bit PWM on ATmega32u4. Setup: pinMode(13, OUTPUT); pinMode(10, OUTPUT);   // 10-bit operation TC4H = 0x03; OCR4C = 0xFF; //Configuration of Timer 4 Registers, OC4A (D13) + 0C4B (D10) TCCR4A = 0b10100011; //Prescaler TCCR4B = 0b00000011; pinMode(13, OUTPUT); pinMode(10, OUTPUT); // 10-bit operation TC4H = 0x03; OCR4C = […]

Simple iptables

setup iptables for ssh, zabbix, ping, http cat /etc/network/if-pre-up.d/*   echo -e ‘#!/bin/bash   /sbin/iptables-restore < /etc/iptables.up.rules’ > /etc/network/if-pre-up.d/iptables   chmod +x /etc/network/if-pre-up.d/iptables   echo -e ‘*filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [11:844] -A INPUT -p tcp -m tcp –dport 22 -j ACCEPT -A INPUT -p tcp -m tcp –dport 10050 -s […]

My Debian wheezy minimal postinst

nano /etc/apt/sources.listnano /etc/apt/sources.list deb http://ftp.fi.debian.org/debian/ wheezy main contrib non-free deb-src http://ftp.fi.debian.org/debian/ wheezy main contrib non-free   deb http://ftp.fi.debian.org/debian/ wheezy-updates main contrib non-free deb-src http://ftp.fi.debian.org/debian/ wheezy-updates main contrib non-free   deb http://security.debian.org/ wheezy/updates main contrib non-free deb-src http://security.debian.org/ wheezy/updates main contrib non-free   deb http://ftp.fi.debian.org/debian/ wheezy-backports main contrib non-free deb-src http://ftp.fi.debian.org/debian/ wheezy-backports main contrib non-freedeb http://ftp.fi.debian.org/debian/ […]

Redmine from wheezy-backports, autocreate repos and access control

I had some trouble getting Redmine with subversion installed on debian wheezy. The main problem was the outdated version in the default repositories. I decided to use wheezy-backports repo to get a fresh but reliable version installed. I also wanted automatic repository creation and redmine usernames and passwords to control the access to the repositories. […]