For February, 2015

3D Printing ABS Juice

No Comments

ABS juice makes the first layer of a print stick very well to the print bed. Put a small quantity of ABS juice on a paper towel and rub it gently on the printing bed. Making ABS juice is simple. In order to do so, you will need:

  • At least 250 ml of pure acetone
  • 30 cm of 3 mm ABS filament OR 90 cm of 1.75 mm ABS filament
  • An acetone safe container with a cap

Cut the ABS filament in small pieces of 1 to 2 cm. Put 250 ml of acetone in the container. Put the filament into the container. Put the cap on and shake the bottle for a few seconds. Let it sit there overnight. The ABS will dissolve completely. Shake the bottle before using it. 250 ml is plenty for many prints.

How to Install libnfc for PN532 NFC Readers on Linux


Installing libnfc for PN532 based NFC reader is not exactly as described in the documentation. Some information is scattered in the documentation. This installation guide has been tested with the GO2NFC GO2NFC141U NFC Reader and the Adafruit PN532 NFC/RFID controller breakout board.

1) Install the dependencies:

sudo apt-get install libusb-0.1-4 libusb-dev libpcsclite1 libpcsclite-dev libccid pcscd

2) Create the configuration directory

sudo mkdir -p /etc/nfc/devices.d/

3) Create the file /etc/nfc/devices.d/pn532_uart.conf containing

name = "PN532 board via UART"
connstring = pn532_uart:/dev/ttyACM0
allow_intrusive_scan = true

Replace ttyACM0 with ttyUSB0 if you are using the Adafruit reader.

5) Create the file /etc/nfc/libnfc.conf containing

allow_autoscan = true

6) Download the libnfc library at Decompress the archive somewhere. Go into the libnfc-x.x.x directory.

7) Build the library

sudo ./configure --sysconfdir=/etc --prefix=/usr --with-drivers=pn532_uart
sudo make
sudo make install

8) Test your installation. Execute the command utils/nfc-scan-device. You should get an output similar to this one:

nfc-scan-device uses libnfc 1.7.1
1 NFC device(s) found:
- pn532_uart:/dev/ttyACM0:

How To Setup an Internet Gateway using Ubuntu

No Comments

Setting up an Internet Gateway using Ubuntu is pretty straight forward. In order to do so, you will need:

  1. A computer with two network interfaces. One hooked to your WAN connection, the other one to your LAN.
  2. The computer needs Ubuntu installed with a minimum of software installed.
  3. Copy the script below to your gateway machine in /etc/network/if-up.d/00-my-gateway. Make sure that the script has the execute permission.
  4. Update the LAN and WAN variables in the script. For example, if eth0 is your WAN interface and eth1 is your LAN interface, then set WAN=eth0 and LAN=eth1.
  5. Reboot.

This script configures the Ubuntu Firewall to forward LAN traffic to the Internet but drops all unsolicited incoming traffic from the Internet. Your network will be stealth. You can use the online tool ShiedlsUP! at to test it.



# Interfaces

# Delete all existing rules.
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X

# Enable routing.
echo 1 > /proc/sys/net/ipv4/ip_forward

# Loopback traffic.
iptables -A INPUT -i lo -j ACCEPT

# Allow established connections.
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i $LAN -j ACCEPT
iptables -A FORWARD -i $WAN -o $LAN -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allow connections from the $LAN to the $WAN.
iptables -A FORWARD -i $LAN -o $WAN -j ACCEPT

# Enable masquerading.
iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE

# No forwarding from the $WAN to the $LAN.
iptables -A FORWARD -i $WAN -o $WAN -j DROP

# Drop everything else from the WAN ... Stealth mode.
iptables -A INPUT -i $WAN -j DROP

SYSTEM WARNING: session_start()…No such file or directory.

No Comments

When installing Mantis in a shared hosting environment, you may get an error message like this one on the Mantis login panel:

SYSTEM WARNING: session_start() [function.session-start]: open(/var/php_sessions/sess_ac5acafaecb612345675d30123456789, O_RDWR) failed: No such file or directory (2)

This message is likely caused by the fact that /var/php_sessions/ is not accessible. It can be resolved by adding to the config_inc.php file the following line
$g_session_save_path = '/home/users/web/b880/ipw.myaccount/sessions';.

Replace the path above by one accessible by your environment.

How to rotate or flip a video?

No Comments

This can be easily done using HandBrake. Simply add the following option in the tab VIDEO in the EXTRA OPTIONS box:

, --rotate=n

Take note that the comma and the space following it are required.

n can take one of these values:
1 = x flip
2 = y flip
3 = 180 degrees rotate (DEFAULT)
4 = 90 degrees rotate (clockwise)
5 = 90 degrees rotate + y flip
6 = 270 degrees rotate + y flip
7 = 270 degrees rotate

Installing memcached to use it with php

No Comments

Installing Memcached with php support in Ubuntu is a matter of a few steps:

sudo apt-get install memcached php5-memcached
sudo service apache2 restart

You can test if memcached is active by running this command:
echo "stats settings" | nc localhost 11211
You will end up with a response like this one:

STAT maxbytes 67108864
STAT maxconns 1024
STAT tcpport 11211
STAT udpport 11211
STAT inter

STAT item_size_max 1048576
STAT maxconns_fast no
STAT hashpower_init 0
STAT slab_reassign no
STAT slab_automove 0

Logic Probe Case

No Comments

“Logic Probe Case” is now available. More details at Logic Probe Case.

Blue Taste Theme created by Jabox