Secret Waffle Labs

You were never here… You didn't see anything….

December 28th, 2013

Remote IP Display

3 Comments, Code, by andarius.

Getting the IP of a remote machine that requests a page via PHP is simple. On top of that there are services on the web where you can do it. or are two of the more popular among them.

The purpose of this however is to provide myself with my own means of getting an external IP while I am out running around or at home without running in to any limitations. Plus why provide another site with hits and have adds crammed down my internet pipe if I can do this myself? I prefer a bit of self reliance…

On to some simple PHP code:

echo $ip;

Simple snippet of code saved in to a file all by itself and served up by a PHP capable web server. The page is found on this site here! Curerntly publicly accessible and with no limits.

It is very spare in that it will simply output the IP address of the requester. It makes no attempt to deal with proxies or any other fancy network shenanigans. The goal is to have output that can be pulled via a script using say curl or wget.

November 14th, 2013

DC-to-DC Step Down Supply

No Comments, Hardware, by andarius.

A current project I am working on will require a decent amount of 5VDC current. A wall wart may get the job done but I don’t have many of those lying around with an ample current supply. I am looking to get around 2 amps continuous from the device.

Digging around I learned the LM2596 from Texas Instruments would do the job. As luck would have it ebay is a great source for these devices. Not only the IC but a complete supply board with the ancillary components coming along with it. The units come a few flavors but I picked up a bunch of them with a pot on them which are adjustable from 1.5 to 35 VDC out with an input range from 4 to 40 VDC. Even better, once they are set if you vary the input voltage the output voltage stays constant.

A co-worker asked a key question I did not think of at first. How well do they block ripple or spikes. To get an idea I hooked one up to a 5VDC wall wart (came with a D-Link switch) and set the output to about 2.5VDC. The image below speaks for itself.




October 27th, 2013

Site Registration

No Comments, News, by andarius.

Registration on the site is no longer open. Seems the only people who want to register are spammers and I am growing wear of bogus new user emails. Should a legitimate user wish to register simply email the site admin and it will be taken care of.

January 8th, 2013

Gentoo Portage Direcotires

No Comments, Linux, Tips & Tricks, by andarius.

I think I missed it, or just overlooked the option, but portage can use directories for the package specific options. So rather than a single file like package.use you can create a directory package.use and create a file inside with the content for a specific pacakge. This makes sense to me as it would allow one to more easily see what is there without reading through a file and manage things more easily as you can simply add a file to enable something or remove it to disable it. But how to quickly move tot he directory structure of things…

Bash to the rescue of course. A quick one-liner for each one you already have a file for and you are off. Simply create a temp direcotry, run the command and, remove the file and move your directory in to its propper place. For example to mangle package.accept_keywords:

mkdir package.use_tmp
while read line; do echo "$line" > package.use_tmp/$(echo $line | awk '{ print $1 }' | cut -d "/" -f 2); done < package.use
rm package.use
mv package.use_tmp package.use

Line 1 creates the temporary directory. Line 2 reads the input file line by line and echos the line content out to a new file in the temporary directory. Line 3 removes the old file which is no longer needed. Line 4 moves the temporary directory in to place.

I edit and run this as needed for all the files I had. All done…

December 10th, 2012

Nvidia Fan & Temp Control – Part 1

No Comments, Hardware, Linux, Tips & Tricks, by andarius.

This is part 1 of a multi-part post. I am breaking this one up to make it easier to follow.

In my efforts to manage the temperatures and therefore fan speed of my nvidia graphics cards I have created two scripts. There are two as one step only needs to be performed a single time, while the other is currently tied in to conky so it is run at a set interval and I can see the results. Once I am comfortable with the script work I will drop it from conky and run it on its own as I generally don’t ogle my hardware sensors these days unless something is crashing. More

October 29th, 2012

Asus ENGTX465 Temperature Control

No Comments, Hardware, Linux, by andarius.

A good while back I put up a post about new hardware I had acquired. I have been happy with said hardware with one small glitch. From time to rare time the system would hang. Nothing indicated a failure, no errors in the systems logs, just a dead locked system that required a physical reboot. After a long time of searching I have finally found the cause, video card heat from my three Asus ENGTX465 video cards.

I monitored the card temps so was under the impression they were OK. I even had a bash script that I tied in to conky to output the GPU and card temps. I saw some decently high temps from time to time but nothing close to what the listed thermal specifications were. I made the assumption that the cards cooling hardware was doing what it should be doing… shame on me.

While working with some tweaks and cable cleanup inside the case I noticed the cards frame was extremely hot. I mean so hot I was unable to touch it. This is bad for most hardware to the point of maybe having to replace parts. I got to digging around and turned up one can check fan speeds using nvidia-settings or nvidia-smi. I tied this in to the information I was already pulling on temps and found the cards were running the fans at 40% regardless of the GPU or card temperatures. Of course I set out to correct this problem.

I have been working to modify my script to also manage the fan speeds based on temperature. There are already some variants ont he web but every one of those I have come across uses one or two fan speeds all the time.I figure this can be done much more elegantly than low, medium and high so set out to have a dynamically set fan speed based on temps that can climb up or down gradually as needed. I have this working and will post it here once I have completed some final cleanup and tweaks.

The whole reason for this post, to make note that the cards require help to stay cool. Even under Windows they happily tick away at 40% fan speeds and get hot enough to cook lunch on so this in not a Linux thing, but an Asus thing I believe. Under Windows I have installed their Smart Doctor which controls the fan speeds. It has an auto setting that does pretty much nothing and leaves them at 40%. It does however have a settings allowing you to configure temps for a respective fan speed starting with High and working your way down. Sadly this is less dynamic than my script and yields higher temps and more dramatic fan speed changes.

October 23rd, 2012

CM10 & Data

No Comments, Tips & Tricks, by andarius.

I updated the CM10 install on my HTC Sensation today to a release built on the 21st. After the update I noticed I was having data problems. The icon would show no data, then flash 3G, then back to no data.

I read all over the forms on XDA and through the thread for the ROM there. No dice. Two others reported similar issues and another reported slow speeds and ping times. People hammered the topic with “call T-Mobile” and/or “your data plan may be at the cap”. All far from the cause on my device. It came with a flash upgrade… I even checked my data usage and crossed over the coverage of maybe 10 towers on the way home. No change.

One post in the ROM thread noted setting up a new APN using as the APN. This worked. Of course it got me digging to see what could be wrong. My digging lead me T-Mobiles website and a thread for setting up the APN properly on android devices. There were only two items that were off, the password and server both had values in the fields while the T-Mobile post said they should be blank. Clearing these out squared things away for me.

Some may wonder, why not post this on XDA in the ROM thread. I did not because I could not log in. Seems I forgot my password. When I tried to use the “Forgot password” form I would get tanked 9 of 10 tried on the image verification… which is a PoS by the way as I confirmed the text on several occasions. When I finally got it to take the image text, it said my email was not recognized. All three of them. To top things off when I went to re-register the user name I use, taken.  My site, works like a champ, where my user name is reserved just for me…

October 10th, 2012

Gentoo & utf8

No Comments, Linux, Tips & Tricks, by andarius.

I recently managed to get several SSDs and two went into my desktop. For the operating system of choice I installed Gentoo (more on that later). I was fighting for some time to get utf8 characters to display properly in my terminal (xterm) to no avail. The locale was set and everything pointed to things being properly set up.

I am still new to Gentoo, having used it for less than a year now and mostly on my netbook which is light use. Tonight I was learning my way around some more and was focusing on the handy and likely well known tool eselect. Come to find out it has a locale setting as well. Upon issuing it with the list command I discovered it was not set.

The command:

eselect locale list


Available targets for the LANG variable:
  [1]   C
  [2]   en_US
  [3]   en_US.iso88591
  [4]   en_US.utf8
  [5]   POSIX
  [ ]   (free form)

So I ran:

eselect locale set en_US.utf8

Which causes the output of the list command above to now read:

Available targets for the LANG variable:
  [1]   C
  [2]   en_US
  [3]   en_US.iso88591
  [4]   en_US.utf8 *
  [5]   POSIX
  [ ]   (free form)

Note the “*” which indicates the currently selected variable. Now utf8 is properly displayed and I am a happy camper!

September 27th, 2012

Linux & Nvidia & Multi-GPU

No Comments, Hardware, Linux, by andarius.

Multiple monitors are becoming more and more common these days. In previous posts I detailed how my desktop system has three Nvidia  based Asus ENGTX-465 cards with a monitor each. I have been using xinerama to configure the screens to allow me to move a window across all the screens without problems. The down side is performance plain sucks compared to what it should be.

I am presently working through installing Gentoo on the desktop (formerly Crux) and have been reading everything I can find on a more suitable solution. There is oe from Nvidia that looks very promising called “base mosaic”. This configures all the screens together and basically allows one to discard xinerama. Sadly it does not work for me. It loads up and crashes the system with a hard lock that requires a power cycle. I have yet to find a solution but will keep looking with an eye on base mosaic constantly for improvement.

Till then… back to xinerama. I should have a post or two in the coming days to detail the Gentoo install on the desktop.

Pages: Prev 1 2 3 4 5 6 7 8 9 10 ... 15 16 17 Next