/dev/random Nonsense Ensured

8Sep/110

My experience customizing an Android phone

forward: Hi, everyone! Nate here, swapping posts with Travis. Or, if he ends up thinking for a while and kind of forgetting, then that's fine too! I hope to mold this outline into more of an article over the weekend.

Look and feel: launchers

If you're unhappy with Android, I recommend downloading ADW Launcher from the market. ADW is what's know as a "launcher," a "home replacement app," a different homescreen, you name it. By default, the Motorola Droid X comes with the "Blur" interface. If you're getting tired of MotoBlur, or getting tired of HTC's "Sense" interface, I recommend checking out a home replacement app. My favorite is ADW because it has the most custom themes and has easy widget resizing. I was also happy with GO Launcher and LauncherPro. So, these custom home screens provide you with a bit more customizability.

Also, another big feature of these "home replacement apps" is that all 3 provide "hide from app drawer" options. So, you can hide the freaking Blockbuster app, the Amazon Kindle app, Madden, all those garbage apps that Motorola and Verizon load onto your phone. The pre-loaded apps pay for the phone through advertising, but I'm not interested in wading though garbage whenever I want to find an app. So, "hide apps from app drawer." It will change your life. For the better.

Battery life

Android's battery life can be a little bit limiting. So, I'll tell you what worked for me, and a bit of background about why it works.

  • screen to dim. The screen is huge. It is bright. It sucks power. Make the Power Widget on your home screen. That should let you adjust the brightness. Unless it's sunny, you probably won't notice the dimmer screen. If you dig down into Android's Settings, should be something like Settings, Battery, View Stats, you can view how much each program is using the battery. Wait a bit after start-up to get a more accurate reading. But yeah, for me, turning the screen down was the biggest battery saver.
  • Don't worry about Task Killers . . . everything on your phone is running there for a reason. If you don't know what it is, don't kill it. Idle processes aren't going to hinder performance. They're in a "sleep" or "ready" state where they aren't running on the CPU (source: Dr. Kapenga in CS 4540 Operating Systems. 5-state diagram, baby). Anyways, if you really don't want the process running, uninstall it. Ask me or search in the forums if you're not convinced about "task killers."
  • GPS: you can turn it off from the Power Control widget. It's a "radio" signal, and it's using battery.
  • If you have $20 and want to invest a week of consciousness, you could buy an "extended battery." I have the Motorola Droid X, which comes with a Motorola BH5X battery. This gave me about 1 day of battery life. That is to say, daily use called for nightly charging. I sprung for the extended battery, called the "BH6X." It's a little fatter, but don't worry about it. I got probably 1.5 days out of this bad boy. A decent performance increase.
  • The biggest thing to remember about battery life is that you're basically carrying around a laptop walkie-talkie in your pocket. It consumes a lot of power. If you're looking for stellar battery life, check out a non-smart phone ("feature" phone), or maybe a netbook. It's a freaking miracle that these devices work. They are 4000+ years of human ingenuity and science, and we're improving all the time. So, we make choices and trade-offs, and we find a useful solution.

(more to come?)

I won't really touch on rooting/gaining superuser access. For an awesome run down onrooting, check out an earlier post from Travis, called Why Root Your HTC Droid Incredible. http://www.dev-random.me/why-root-htc-droid-incredible

Filed under: Uncategorized No Comments
1Sep/111

Intro Guide to SSH, GNU Screen, and irssi

So I finally got tired of explaining what GNU Screen is and how to use irssi with it so you can idle on IRC nets.  To start, I'll draw a picture to help you visualize how this all works (I like drawing pictures, enjoy my MS Paint sillz).

Obviously I'm assuming you (the client) is on Windows, which if you're reading this, you probably are.  Mac and Linux users, obviously just replace PuTTY with Terminal/OpenSSH.  So I guess we'll go ahead and start with ssh.

Secure Shell (SSH)

So, when sshing from Windows, the easiest way is to use PuTTY (there are many ssh clients for Windows, personally I use Cygwin/OpenSSH/mintty, but PuTTY is quick and easy).  When you start PuTTY it'll ask you where to connect, pretty straight foward.  Just enter your username@linux.host.whatever like so:

It will ask you if you want to accept the public key of the server you are trying to connect to if it's your first time, that's fine, accept it.  Then it'll ask you for a password, there will likely not be any feed back, don't worry, it is working.

Now you should be connected to your Linux box!  Woot, now we can start talking about Screen and irssi.

GNU Screen

So to really understand how Screen works, you have to understand the concept of terminals / virtual terminals.  In a nut shell, the way you interact with a Unix/Linux box is a terminal, which you run a shell on top of.  So when you log into your Linux box you get your own virtual terminal to interact with the computer.  Now, normally with just ssh, you get one virtual terminal per session, but what Screen lets you do is take that one terminal and use it to make more virtual terminals.  But it does something else that makes it ideal for IRC idling, you can disconnect from those virtual terminals and completely disconnect from the box, login again, and then reattach to those virtual terminals.  Pretty neat, eh?  I think so :)

Alight, so now that you know more than you wanted, how do make use of it? Well lets start by starting Screen.

Before I launch screen

After I launch screen

So my screen configuration has that neat little bar at the bottom that shows (from left to right) hostname, windows open / current window (red), and load averages on the server (had some problems with fork bombs.... better to keep an eye on 'em ;) )  Anyways, I'll post my .screenrc at the end of this article if you want it.

So now that you're in screen, how do you interact with it?  By default the "modifier key" is control+a.  So what that means is when you press control+a (like select all in winderz) Screen then listens to what keys you press next.  (Note: From now on I'll refer to control+a as ^a)  (Note 2: after you press ^a you can let go, then press the next key)  Anyways, here's a few basic commands you'll need to know:

  • ^a + c   Open New Screen Window
  • ^a + n   Next Window
  • ^a + p   Previous Window
  • ^a + k   Kill Window
  • ^a + d  Detach From Screen (i.e. drop to your ssh terminal)
  • ^a + DD   Power Disconnect (Detach from screen and log out of the server) (I like this one ;) )
  • ^a + ?   Help window (gives some commands and descriptions)

Note that those are only a few, I would recommend at least looking at the help window, if not looking for a more in depth guide.

So now you know how to move around and use screen (kind of anyways) and maybe you decided to try detaching already and are probably wondering how to reattach.  You still reattach with the screen command, but you'll need to pass it some arguments so it doesn't start a new screen session (you can have more than one).  Now there are different ways to reconnect, but the easiest way assuming you're only running one screen instance is to run "screen -rD".  What that tells screen to do is to reattach and disconnect everyone else from it.  Why would you want to do that last part? Well if you accidentally disconnect uncleanly or leave yourself logged in somewhere, you won't be able to reattach before disconnecting those sessions, so just putting the -D on there makes screen always disconnect your other sessions.

Alright, now I know this isn't the easiest to follow, and I'm trying to be too complicated about this, I know it's hard to grasp all of this especially if you aren't used to a Unix like environment, but good job for making it this far! :D

So you have screen attacted and you're at a shell prompt, lets talk about irssi.

irssi (IRC Client)

Alright, so we're almost there now, you've launched irssi and just have to connect to your IRC Server.  Start by doing a "/connect irc.whatever.stuff" and that will connect you to the IRC server you want to connect to.  It'll probably look something like this after you have:

So at this point it's just a matter of doing a "/join #channel" to join the channel(s) you want to idle in.  Remember to do a ^a + d to disconnect, not a /exit (that will exit irssi and defeat the purpose of running it in screen) and when you log back in to do a "screen -rD" to reattach to your screen session.

If you have any questions feel free to ask in the comments or in #geekboy!

Downloads

More Reading

Filed under: Uncategorized 1 Comment
12Aug/116

Free Calling with Google Voice and Asterisk

asteriskgvoice

I've been playing with Asterisk and Google Voice for the better part of a year now, and just recently was finally able to get it all working the way I wanted it to. When Google started letting you make phone calls using Voice from Gmail, they opened up the ability to make phone calls over gtalk, their XMPP/Jabber based IM/Voice/Video service. When I heard that, I thought it would be a piece of cake to get Voice working with Asterisk's Jabber/Jingle channel... nope! In fact, Voice didn't start working with Asterisk until 1.8.1 which is what I was waiting to finally become stable enough to use. Then after a few more problems with Asterisk breaking support for my Cisco 7960 (SIP) which was finally fixed in 1.8.4.4. Now that you've heard my life story, here's how I got that working.

Prerequisites

  • A modern Linux box, I'm running OpenSUSE 11.4 Kernel 2.6.37.1
  • Asterisk 1.8.1.1 or newer, I'm running 1.8.4.4 (to get support for my Cisco 7960 SIP)
  • Some sort of VoIP phone connected to your Asterisk box, soft or hard

Google Voice Setup

You need to, of course, have a Google account, with Voice enabled, and Gmail calling turned on as well.  Once you have that setup, make sure that you change the Chat setting from the default of "Automatically allow people that I communicate with often to chat with me and see when I'm online" to the second option of "Only allow people that I've explicitly approved to chat with me and see when I'm online."

Asterisk Setup

On the Asterisk side, things aren't quite as easy.  You'll want to make sure you have at least the chan_gtalk and the res_jabber modules compiled and installed before proceeding or else none of this will work.  I of course needed things like chan_sip as well to work with my Cisco 7960.  In your Asterisk configuration directory (usually /etc/asterisk) you'll need these conf files to look at least like this:

/etc/asterisk/gtalk.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[general]
context=local                   ; Context to dump call into
bindaddr=10.8.2.5               ; Address to bind to
;externip=1.2.3.4               ; Set your external ip if you are behind a NAT.
;stunaddr=mystunserver.com      ; Get your external ip from a STUN server.
                                ; Note, if the STUN query is successful, this will
                                ; replace any value placed in externip;
allowguest=yes                  ; Allow calls from people not in list of peers

[guest]                         ; special account for options on guest account
disallow=all
allow=ulaw
context=local
connection=asterisk

/etc/asterisk/jabber.conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[general]
debug=no                                ; Enable debugging (disabled by default).
autoprune=no                            ; Auto remove users from buddy list. Depending on your
                                        ; setup (ie, using your personal Gtalk account for a test)
                                        ; you might lose your contacts list. Default is 'no'.
autoregister=yes                        ; Auto register users from buddy list.
;collection_nodes=yes                   ; Enable support for XEP-0248 for use with
                                        ; distributed device state.  Default is 'no'.
;pubsub_autocreate=yes                  ; Whether or not the PubSub server supports/is using
                                        ; auto-create for nodes.  If it is, we have to
                                        ; explicitly pre-create nodes before publishing them.
                                        ; Default is 'no'.
;auth_policy=accept                     ; Auto accept users' subscription requests (default).
                                        ; Set to deny for auto denial.
[asterisk]
type=client                             ; Client or Component connection
serverhost=talk.google.com              ; Route to server for example, talk.google.com
;pubsub_node=pubsub.astjab.org          ; Node to use for publishing events via PubSub
username=butters08@gmail.com/Talk       ; Username with optional resource. (must be /Talk for Voice)
secret=XXXXXXXXXXXXXXXX                 ; Google Password
;priority=1                             ; Resource priority
port=5222                               ; Port to use defaults to 5222
usetls=yes                              ; Use tls or not
usesasl=yes                             ; Use sasl or not
;buddy=mogorman@astjab.org              ; Manual addition of buddy to list.
                                        ; For distributed events, these buddies are
                                        ; automatically added in the whitelist as
                                        ; 'owners' of the node(s).
;distribute_events=yes                  ; Whether or not to distribute events using
                                        ; this connection.  Default is 'no'.
status=away                             ; One of: chat, available, away, xaway, or dnd
statusmessage="I'm an Asterisk Server!" ; Have custom status message for Asterisk
timeout=100                             ; Timeout (in seconds) on the message stack, defaults to 5.
                                        ; Messages stored longer than this value will be deleted by Asterisk.
                                        ; This option applies to incoming messages only, which are intended to
                                        ; be processed by the JABBER_RECEIVE dialplan function.

/etc/asterisk/extensions.conf

Now obviously not all of this is required, this is just how I have my dial plan setup. To receive incoming calls from Voice you must have a exten => s,1,Answer() though as Voice doesn't say where it's coming from.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
[general]
static=yes
writeprotect=yes
autofallthough=yes
clearglobalvars=no
priorityjumping=no

[local]
exten => s,1,Answer()
exten => s,n,Set(crazygooglecid=${CALLERID(name)}) ; Get rid of crazy Google incoming CID
exten => s,n,Set(stripcrazysuffix=${CUT(crazygooglecid,@,1)})
exten => s,n,Set(CALLERID(name)="${CURL(http://cnam.bulkCNAM.com/?id=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&did=${CALLERID(num)})}") ; Set Caller ID from bulkCNAM
exten => s,n,Wait(2)
exten => s,n,Dial(SIP/102&SIP/103,20,D(:1)) ; This sends the 1 after you answer, otherwise it'll fall back on Google Voice-mail
                                            ; It also dials my SIP phones (7960 and Android 2.3 Phone)

; Internal Calling
exten => _1XX,1,Dial(SIP/${EXTEN})
; External Calling
exten => _1XXXXXXXXXX,1,Dial(gtalk/asterisk/+${EXTEN}@voice.google.com)
exten => _XXXXXXXXXX,1,Dial(gtalk/asterisk/+1${EXTEN}@voice.google.com)

Final Thoughts

I know this isn't the most in depth guide on getting Asterisk working on your machine, but there are enough guides out there for that. Hope my article helped you get Voice working with Asterisk, happy calling!

References

12Mar/113

Android Home Screen

home2

I spent a fair amount of time setting up my current home screen.  I got the idea from this reddit post and followed this guide to start.  I made a lot of the icons myself, though some aren't mine.  Here's the images I used, feel free to do whatever with them.  You need Photoshop to make new ones and the Helvetica font, which I found by Googling "Helvetica filetype:zip", here it is.

 
 
 
 
 
 

Widgets / Applications

  • LauncherPro Plus v0.8.3
  • Beautiful Widgets
  • Desktop Visualizer

Images

Downloads

I'd be happy to answer any questions in the comments!

Filed under: Android, Linux 3 Comments
25Jan/110

Rolling Ball

This is my second project for my video game design class. It's pretty simple, use wasd and the mouse to control the ball. The goal is to get to the top, but take some time and explore. Here's the Windows version if you don't want to play in the browser. And the source code if you want to look at it.

Filed under: Video Games, WMU No Comments
18Jan/110

Rube Goldberg

First project for my video game design class, here's the compiled windows version: Rube Goldberg Game and the source code

Filed under: Video Games, WMU No Comments
29Aug/100

My Life, an Update

I guess to deviate away from my typical techie articles, I'll write a bit about my life and what I've been doing in the last 6 to 8 months (since I know nobody reads my blog for the tech stuff anyways, so here's to you faithful readers, if you even exist O.o).  My life is an interesting thing to reflect on, which I find myself doing daily, right now even.  I find myself replaying my day in my head, critiquing myself, envisioning the next day, my goals, my future... all the time.  In fact, I think so much, I find myself wishing I could just shut it off sometimes, it causes some pretty bad insomnia most nights, but I know this stems from my anxious personality, so I guess it's just who I am so I'm learning to deal.  So, my life now?  What am I doing?  Well I'm entering my third year in college, wishing it was my fourth, unlike most people my age who seem to want to stay students forever, I find myself ready to move on to the next step, find a career, a steady girl friend, a house, etc. (of course, my whole life I've always wanted to live older than I was, something I try to fight and live a bit more in the present so as not to let it pass by and regret it later, which inevitably happens, but such is life.  I've been told more than once that I'm 20 going on 40 :/).  I am excited though to not be taking a math class this semester (I'm done with my math minor save a stats class! woot!), even though I enjoy math, math classes I've come to hate, in fact I'm just an all around bad student, but I love learning, ironic?  Eh.  It will be a good year, each year here has been getting progressively better as I make better friends with the people I know here, get to know the city better, and find myself more and more comfortable here.  I find myself happy to call Kalamazoo home.

My summer was, relaxing, but too hot.  I. Hate. Heat.  Like, I would not be unhappy if it never got above 60 again (and my want to move to the North West Coast and Alaska becomes more clear).  I am really looking forward to fall and winter, my favorite seasons.  But, of the few things I like about summer, I do enjoy sailing.  I didn't get to sailing as much as I would have liked to this summer, but I did get to go with my Dad a few times, and I really enjoyed it.  I hope to own my own sail boat some day soon (have to graduate first... O.o).

Sailing

It's a fun hobby to say the least, something I'd like to get better at, although I have been getting OK at trimming and knowing what to do and when.

Music.  Music has become such a part of my life.  I listen to music much more than I used to, like there is rarely an idle moment where I don't have something playing.  I use last.fm addictively, like most people use Facebook.  Radiohead has become my soul, Death Cab my heart.  From there I've been branching out slowly, discovering artist after artist showing up in the "you might like" area.  At the moment I'm moving (slowly) away from Breaking Bells (though never away away, just not all the time) and discovering The Flaming Lips.  They are a pretty excellent band.  Rdio has made discovering new music 10000000x easier because I can listen to my music on my phone as well as my computer, and at least 20% of my music listening is in the car (totally made up statistic, but probably true, in case you were wondering :P ).  But yeah.  Music.  (http://www.last.fm/user/aka_butters). Kid A

I guess I'll be done here, save something for a more frequent update, maybe in a month.... we'll see.  I'm sure they'll be several less interesting post about whatever I'm working on at the moment, deal, it's what I do.  Anyways, the sun is greeting me, that horrible horrible thing.  I apologize in advanced for my grammar and/or spelling, blame my lack of any desire in my youth to learn any better (although I do try now) and the fact that it's almost 7am and I haven't gone to bed yet... But yeah, there you have it.  One update.

Tagged as: No Comments
11Aug/104

Connecting to WMU’s Cisco VPN from Linux

So if you're like me and you happen to use Linux instead of Windows or Mac OS X and you want to connect to Western's VPN (or any Cisco based VPN really, though I'll go though some Western specific steps) then I'm writing this for you.  For this guide I'll be assuming you're running Ubuntu 10.04 and using NetworkManager (although I'm pretty sure you can do this with just the Cisco VPN Linux Application vpnc).  Note some issues you might run into that I'll address at the end.  Anyways, here it goes.

1. Install network-manager-vpnc

Run this from a terminal

travis@bender:~$ sudo apt-get install network-manager-vpnc

2. Acquiring the WMU pcf file

So I decided it was probably not a good idea to post the pcf file on here because I don't want to stir up any problems by posting the "encrypted" (lol yeah, right) group password.  Anyways since you're already using Linux, this step isn't too hard.  Start by logging into GoWMU and then going to the VPN area and download the Student Mac client.  Now you should have the file vpnclient-darwin-4.9.01.0080-universal-k9.dmg somewhere.  I'll be working on it in my home directory.

Changed my mind since they took down the old VPN clients, although the Cisco VPN server is still running, here it is.

travis@bender:~$ mkdir vpnclient
travis@bender:~$ sudo mount -t hfsplus -o loop vpnclient-darwin-4.9.01.0080-universal-k9.dmg vpnclient/
travis@bender:~$ cp vpnclient/Profiles/WMUExternal.pcf .

Now you should have the pcf file in your homedir.

3. Configuring NetworkManager

Start by right clicking on NetworkManager and click "Edit Connections".  Then click the VPN tab and click "Import".network connectionsSelect the pcf file in your home directory and click open.  It should look like this (I blurred out the IP just in case).edit wmu vpnFill in the Username and set the User password if you want it saved.  Then click the IPv4 Settings and click then click Routes.  Then click "Use this connection only for resources on its network".routesClick OK and then Apply.  At that point it should work, if you have any problems let me know!

Tagged as: , , 4 Comments
3Aug/105

The Uberman Sleep Schedule

So I've decided to try a Polyphasic sleep schedule while I still have a month left of my summer. After doing a fair amount of reading, I was going to start a Biphasic sleep schedule but then after considering it more and reading more I decided the Uberman would be the most fun to try. Why? Because this will probably be the only time in my life when I'll have a schedule that will allow me to do this, the time to adjust (~1 month), and be healthy enough to make it though the adjustment. I'm not sure I'll be able to make it or how long I'll stick too it if I even am able to pull it off, but I'm going to give it my best. So now that have explained what I'm doing, I should talk a bit about what the Uberman sleep schedule even is. Basically every 4 hours, I'll be taking a 20 minute nap. I've decided to do 1, 5, and 9 around the clock because it will best fit my work schedule, social events, and class schedule in the fall (if I even make it that long!). Here's a visual representation I borrowed from wikipedia:

Uberman Sleep Schedule

Uberman Sleep Schedule

Anyways I plan to post a blog post every few days at least, probably more regularly because I'll be struggling to find things to do these first few days.  From what I've read, the next week is going to be hell, but after that is when I'll start to feel rested all the time, my overall mental alertness restore and even increase some, and my body begin to accept the new schedule.  I started at 1am today and so far after almost falling asleep before my alarm going off I now feel tired and groggy, I only expect it to get worse over the next few days.  Anyways, wish me luck, I'll post again in a few hours.

References / Additional Reading:

Tagged as: , 5 Comments
25Jul/105

L4D2 on a 6600GT

So a few weeks ago my "better" graphics card died (granted it wasn't anything great, a Nvidia 7900GS) and I was left with only an old Nvidia 6600GT (minimum required graphics card for L4D2).  Now if you follow graphic technology at all, I went from a 4 year old card to more like a 6 year old card.  Well, I'm cheap and I'm waiting for XFX to tell me if they're going to replace my card or not, but I still want to play games, specifically Left4Dead2.  So after much tweaking, here's how I got it to run smooth enough to play.

Launch Options:

 -dxlevel 81 -heapsize 1048576 -nojoy -noipx -noforcemspd -width 960 -height 600 -lv -novid -console -dev

What does that mean:
-dxlevel 81 This forces into DirectX mode 8.1, a lot easier on your graphics card
-heapsize This makes the heap size larger (i.e. more ram available to the game)
-nojoy Disable the joystick support
-noipx Disable IPX support
-noforcemspd Not sure what this does
-width / -height set to the resolution of your monitor (I'm using half resolution, 1920x1200 is too large and FPS is too low at full resolution)
-lv Low Violence, zombies disappear, no blood, less work on your card. (large performance boost)
-novid Disable startup video
-console Enable console (optional)
-dev Display developer feedback in game (optional)

Also make sure to put everything on lowest settings in game, disable anti-aliasing, etc.  Also will want to turn on "net_graph 1" in the console to get the FPS displayed in the bottom right.  With this I can usually pull 20 - 40fps in game, which is playable enough.  Still not quite getting enough FPS in game?  Other things you might want to try:  I run Windows 7, I went though and disabled extra services I didn't need such as Aero, Windows Search, etc.  Granted my computer looks like Windows 98, I honestly prefer it this way.  If anyone can think of other things, post them in the comments and I'd be happy to add them to the post.  Now go kill some zombies!

Hit me up on steam if you ever want to play!

Page 1 of 212
  • Twitter
  • Buzz
  • Tumblr
  • Facebook
  • LinkedIn
  • Digg
  • Picasa
  • Flickr
  • Panoramio
  • YouTube
  • Last.fm