{ Josh Rendek }

<3 Go & Kubernetes · honeypots · homelab · leadership

Nov 6, 2009 · 1 min

C++ not reading in integers: Windows vs Mac error?

Well I was doing some homework today in XCode and ran across a strange error…

Assume the first line of the file is an integer, lets say 127

ifstream inFile;
int number;
inFile >> number;

You would think, on both windows and mac this would store 127 in number. Only on windows. On my mac it would read in 0 as the value.

On mac (specifically in xcode) to get that number…

read more

Oct 16, 2009 · 1 min

Small Updates

Let me know if you notice anything broken or borked… just moved the blog to a new server.

Since my last post I’ve added a few new things to my github account… one is a mmorpg rails plugin and another is a server automator for fresh installs to get them production/development ready.

Shell script icon Server Setup Fu
A collection of shell scripts that you run once to setup a bare metal server for development or production.
Ruby on Rails icon mmo_fu
A rails plugin to interact with MMO websites like: wow armory, lotro armory, etc.

Servly is also still chugging a long and is going to be offered as SaaS – I’ll post more information about how to sign up once we get closer to launching it.

read more

Sep 30, 2009 · 1 min

Servly - What I've been busy with...

I originally wrote Servly to be a service where people would register and have their own personal accounts on a server. I’ve redesigned this and done a 180 and plan on making it a solution hosted by whoever uses it on their own hardware (although I may release a shared version for people to use as a software as a service… or may only release it as that, not sure yet).

read more

Sep 7, 2009 · 1 min

Apple jokes...

This always cracks me up whenever I hit “Get Info” for a PC….BSOD!

Mac Get Info icon joke showing a Windows BSOD as the PC's icon

read more

Sep 5, 2009 · 1 min

Leapord -> Snow Leapord MySQL Issue

Well I was going to write a really long blog post about this but others have already done a really good job. I had to copy all my innodb files over (when you do, make sure permissions are right) and do a pristine gem update but most of it was pretty painless…

Recommended reading: http://afreshcup.com/2009/09/02/migrating-to-snow-leopard-for-rails-development-a-definitive-guide/

http://frozenplague.net/2009/08/snow-leopard-rubyrails-developer-setup/

A mixture of both and a little bit of tinkering on my own managed to get my development environment back to sanity.

read more

Aug 29, 2009 · 1 min

XPM not being found on php configure

Just spent the better portion of my day fixing a buggered PHP installation…

The magic line: –with-mysql –enable-shmop –enable-track-vars –enable-sockets –enable-sysvsem –enable-sysvshm –enable-magic-quotes –enable-mbstring –with-curl –with-mcrypt –with-freetype-dir=/usr –with-exec-dir=/usr/bin –with-mhash=shared –with-pear=/usr/share/pear –with-zlib –with-openssl –with-xml –enable-gd-native-ttf –with-png –with-zlib –with-zlib-dir=/usr –with-jpeg-dir=/usr –with-png-dir=/usr –with-gd=/usr

^^ MAKE SURE –with-gd=/usr is at THE END

read more

Aug 18, 2009 · 1 min

Lighttpd + mod_magnet on CentOS (64 bit)

After about an hour of tinkering around on google and in the terminal here is what you need to do:

wget http://www.lua.org/ftp/lua-5.1.2.tar.gz
tar xfz lua-5.1.2.tar.gz
cd lua-5.1.2
nano src/Makefile

Replace:

 CFLAGS= -O2 -Wall $(MYCFLAGS) 

With:

 CFLAGS= -O2 -Wall -fPIC $(MYCFLAGS) 
make linux install

wget http://luaforge.net/frs/download.php/2384/md5-1.0.2.tar.gz
tar xfz md5-1.0.2.tar.gz
cd md5-1.0.2
make
make install
cd ..
wget http://luaforge.net/frs/download.php/1678/luazlib-0.0.1.rar

wget wget http://www.rarlab.com/rar/unrar-3.7.7-centos.gz
gunzip unrar-3.7.7-centos.gz
chmod +x unrar-3.7.7-centos
./unrar-3.7.7-centos x luazlib-0.0.1.rar
cd luazlib-0.0.1
make
make install

export LUA_CFLAGS="-I/usr/local/include"
export LUA_LIBS="-L/usr/local/lib -llua"

cd LIGHTTPD_DIRECTORY
./configure -with-lua
make
make install

All done!

read more

Aug 3, 2009 · 1 min

Interesting Loopback Device issue on CentOS

Was playing around with using the loopback devices to mount some OS images on CentOS and following the losetup followed by a mount command would indeed mount the image, but umount wouldn’t unmount it and would leave it stagnant, leaving me with this error:

ioctl: LOOP_CLR_FD: Device or resource busy

Interestingly enough though the lomount command

lomount -diskimage OS.img -partition 1  /MOUNTFOLDER

and then using umount to unmount the mountfolder would unmount the loopback device properly and free it for re-use.

read more

Jul 14, 2009 · 1 min

Gem/Rails CRC Error

[root@unknown openssl]# gem install rails --verbose
GET 200 OK: http://gems.rubyforge.org/latest_specs.4.8.gz
GET 200 OK: http://gems.rubyforge.org/specs.4.8.gz
Installing gem activesupport-2.3.2
ERROR:  While executing gem ... (Zlib::GzipFile::CRCError)
    invalid compressed data -- crc error

After about an hour on the rails IRC and talking with a friend over instant messaging about possible issues it ended up boiling down to openssl and openssl-dev not being installed. Install those but you’re not done yet.

cd to your ruby directory then go into the ext directory, once in there cd openssl; ruby extconf.rb; make; make install, cd ../; cd zlib; ruby extconf.rb; make; make install

read more