Monday, December 29, 2008

Send Text Message via email

Canada


Taken from http://www.hurt911.org/investigation/sms-text-message-address.html

Cell Phone Provider

SMS Address to use

Bell Mobility xxxxxxxxx@txt.bell.ca
Bell Mobility xxxxxxxxx@txt.bellmobility.ca
Fido xxxxxxxxx@fido.ca
Microcell xxxxxxxxx@fido.ca
Manitoba Telecom Systems xxxxxxxxx@text.mtsmobility.com
NBTel xxxxxxxxx@wirefree.informe.ca
PageMart xxxxxxxxx@pmcl.net
PageNet xxxxxxxxx@pagegate.pagenet.ca
Rogers xxxxxxxxx@pcs.rogers.com
Telus xxxxxxxxx@msg.telus.com

Wednesday, November 5, 2008

Pam config to enable only 1 remote ID

Edit /etc/pam.d/ssh and add

account required pam_access.so

Then add

+ : ALL : 192.168.
+ : obamab : ALL
- : ALL : ALL

This will allow ALL id's on 192.168.x.x
and only obamab id from ALL hosts
and then deny anything else

Monday, November 3, 2008

Add vnc port to iptables

[root@dwmythp4 ~]# iptables -L INPUT --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
2 ACCEPT icmp -- anywhere anywhere
3 ACCEPT all -- anywhere anywhere
4 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
5 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited


[root@dwmythp4 ~]# iptables -I INPUT 5 -p tcp --destination-port 5801 --source 192.168.187.0/24 -j ACCEPT
[root@dwmythp4 ~]# iptables -I INPUT 5 -p tcp --destination-port 5901 --source 192.168.187.0/24 -j ACCEPT
[root@dwmythp4 ~]# iptables -L INPUT --line-numbers
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
2 ACCEPT icmp -- anywhere anywhere
3 ACCEPT all -- anywhere anywhere
4 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
5 ACCEPT tcp -- 192.168.187.0/24 anywhere tcp dpt:5901
6 ACCEPT tcp -- 192.168.187.0/24 anywhere tcp dpt:5801
7 REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Sunday, November 2, 2008

Gnome Keyring

It keeps saying

The application 'NetworkManager Applet'
wants access to the default keyring but it is locked

You have to install gnome-keyring-manager which isn't installed by default, then create new keyring with a known password.

Friday, October 3, 2008

Artscow codes

FREE800
FREE10XBOOKS
20RN20SCOASTER
CDR499
FIVE8X10AT099
PPC299

Wednesday, August 13, 2008

HTC Vogue - stuck in bootloader

You'll typically see RUUNBH at the top left of the boot loader. Using SPL 2.31
HTCFlasherGUI (mtty)

Type

cmd> set 16 0
cmd> boot

This will remove RUU flag, and then boot a valid flash from your device.

Friday, August 8, 2008

DD to clone / copy partition to new disk

Backup MBR
dd if=/dev/sda of=/mnt/boot/sda.mbr bs=512 count=1

Restore MBR
dd if=/mnt/boot/sda.mbr of=/dev/sdb bs=512 count=1

Fdisk to change any partitions on new sdb

Then copy first partition

dd if=/dev/sda1 of=/dev/sdb2 conv=noerror,sync

Tuesday, August 5, 2008

Java plugin in Fedora 9 Firefox

Download Sun java (bin, not rpm)

Extract jre to /usr/jre1.6.0_06 (or whatever the version is).
cd ~/.mozilla/plugins
ln -s /usr/jre1.6.0_06/plugin/i386/ns7/libjavaplugin_oji.so

Restart firefox, and all is good.

Monday, July 28, 2008

Metapixel creation in Linux

yum install metapixel - it is in the repositories

Create library

metapixel-prepare -r /data/pictures /data/pictures/metapixel_library

Create metapixel

-s 2 - scale original image x2
-a 30 - cheat with 30% overlay of original image - gives better results
-l - library directory

for i in ~/Pictures/develop/8x8book4/2008/*; do echo $i; metapixel -s 2 -a 30 -l ../metapixel_2007 --metapixel $i meta2007_`date +%H%M%S`.jpg;done

Saturday, July 26, 2008

xmame defaults

These are the defaults for ~/.xmame/xmamerc

vidmod 2
fullscreen 1
rompath /media/disk/roms
defaultgame suprmrio
language english
skip_gameinfo 1

opengl, fullscreen, and rom path

Wednesday, July 16, 2008

VMWare and Activesync

I can not get away from Windows because of Activesync on my PDA. So I still have it in a virutal machine for that reason. To stop the flaky connectivity between usb and pda, on the pda (HTC device using WM6) you have to set

- go to settings/connections
- Choose "usb to pc"
- Disable the "Enable advanced network functionality"
- Reconnect PDA as a usb device in vmware.

Monday, July 14, 2008

Sound plays too fast in Fedora 9

It seems after a system update, ALL sound in Fedora started playing faster... almost like a chipmunk sound... turns out it is a problem with my onboard sound driver(Intel 8xO). Added this to my /etc/modprobe.d/soundcard and everything is back to normal after restart

options snd-intel8x0 ac97_clock=0

This is the card found in my dmesg

ALSA sound/pci/ac97/ac97_codec.c:2120: AC'97 0 analog subsections not ready
intel8x0_measure_ac97_clock: measured 50911 usecs
intel8x0: measured clock 216 rejected
intel8x0: clocking to 48000

No need to update alsa-libs, alsa-utils, etc. Just added the one line and audacious (xmms), mplayer and rhythmbox speed all returned to normal speed.

Monday, June 23, 2008

DVD playback in totem

.... doesn't completely work. No DVD menu (using gstreamer out of the box).

Need to install gstreamer-plugins-ugly, libdvdcss, libdvdnav to get basic functionality. Also, totem-lirc for remote control support.

Wednesday, June 18, 2008

Using mencoder to split / trim xvid files

The key is using the ovc copy and oac copy and the ss / endpos options to choose what y ou're cutting.

mencoder .avi -ss 00:01:33 -endpos 00:05:30 -ovc copy -oac copy -o .avi

This will create a .avi based on the original, 5 min 30 seconds long, starting at position 1m 33sec in the original video. Video/Audio quality will be the same as original.

Tuesday, June 17, 2008

iperf to test network / gigabit connectivity

On the server

[root@server4]# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.1.26 port 5001 connected with 192.168.1.11 port 44838
[ 4] 0.0-10.1 sec 242 MBytes 201 Mbits/sec


On the client

[root@client4]# iperf -f M -c 192.168.1.26
------------------------------------------------------------
Client connecting to 192.168.1.26, TCP port 5001
TCP window size: 0.02 MByte (default)
------------------------------------------------------------
[ 3] local 192.168.1.11 port 36650 connected with 192.168.1.26 port 5001
[ 3] 0.0-10.0 sec 243 MBytes 24.3 MBytes/sec

Sunday, June 1, 2008

Nvidia, Mplayer, full screen, metamodes

In screen section add


Option "metamodes" "CRT-0: 1280x1024_75 +0+0, CRT-1: 1280x1024_75 +1280+0"

to allow mplayer to go full screen on a single monitor.

Oh yeah, and

~/.mplayer/config has

xineramascreen = 2

Friday, May 30, 2008

Gimp.. simple things made complicated

Create a square box

Use the Rectangle select tool. Select Fixed Aspect ratio to make it square. Drag to select the size you want.



Then choose Edit, Stroke Selection to add a border to the box.



Choose Stroke Select options, and hit button and done!

Tuesday, May 27, 2008

Lirc configuration

This is what I use in my /etc/lirc.conf for my Microsoft MCE remote to control my multimedia on my Fedora desktop. Audacious, Rhythmbox, mplayer, xmms, etc, all support lirc. My Mythtv box has a second stanza in this file for my crappy Oneforall universal remote control.


#
# RC-6 config file
#
# source: http://home.hccnet.nl/m.majoor/projects__remote_control.htm
# http://home.hccnet.nl/m.majoor/pronto.pdf
#
# used by: Philips
#
#########
#
# Philips Media Center Edition remote control
# For use with the USB MCE ir receiver
#
# Dan Conti dconti|acm.wwu.edu
#
# Radio, Print, RecTV are only available on the HP Media Center remote control
#

begin remote

name mceusb
bits 16
flags RC6|CONST_LENGTH
eps 30
aeps 100

header 2667 889
one 444 444
zero 444 444
pre_data_bits 21
pre_data 0x37FF0
gap 105000
toggle_bit 22
rc6_mask 0x100000000


begin codes

# starts at af
Radio 0x00007baf
Print 0x00007bb1
Videos 0x00007bb5
Pictures 0x00007bb6
RecTV 0x00007bb7
Music 0x00007bb8
TV 0x00007bb9
# no ba - d8
Guide 0x00007bd9
LiveTV 0x00007bda
DVD 0x00007bdb
Back 0x00007bdc
OK 0x00007bdd
Right 0x00007bde
Left 0x00007bdf
Down 0x00007be0
Up 0x00007be1
# no e2,e3
Replay 0x00007be4
Skip 0x00007be5
Stop 0x00007be6
Pause 0x00007be7
Record 0x00007be8
Play 0x00007be9
Rewind 0x00007bea
Forward 0x00007beb
ChanDown 0x00007bec
ChanUp 0x00007bed
VolDown 0x00007bee
VolUp 0x00007bef
More 0x00007bf0
Mute 0x00007bf1
Home 0x00007bf2
Power 0x00007bf3
Enter 0x00007bf4
Clear 0x00007bf5
Nine 0x00007bf6
Eight 0x00007bf7
Seven 0x00007bf8
Six 0x00007bf9
Five 0x00007bfa
Four 0x00007bfb
Three 0x00007bfc
Two 0x00007bfd
One 0x00007bfe
Zero 0x00007bff
Blue 0x00007ba1
Yellow 0x00007ba2
Green 0x00007ba3
Red 0x00007ba4
Teletext 0x00007ba5
Star 0x00007be2
Hash 0x00007be3
end codes

end remote


Sample of ~/.lircrc file

begin
prog = irexec
button = DVD
config = audacious &
mode = audacious
flags = once
end

begin
prog = mplayer
button = Stop
config = quit
repeat = 3
end

begin
prog = mplayer
button = More
config = osd
end

begin
prog = mplayer
button = volup
config = volume 1
repeat = 3
end

begin
prog = mplayer
button = voldown
config = volume -1
repeat = 3
end

begin
prog = mplayer
button = Back
config = seek -600
end

begin
prog = mplayer
button = Replay
config = seek -60
repeat = 1
end

begin
prog = mplayer
button = Skip
config = seek +60
repeat = 1
end

begin
prog = mplayer
button = Rewind
config = seek -10
repeat = 1
end

begin
prog = mplayer
button = Forward
config = seek +10
repeat = 1
end

begin
prog = mplayer
button = Pause
config = pause
end

begin
prog=mplayer
button=Mute
config=mute
end

[......]