Author Archives: Spechal

Use mogrify to rotate and scale your images on the Linux command line

First, make sure you have ImageMagick installed: #Ubuntu/Debian sudo apt-get install imagemagick #RedHat, Fedora, CentOS sudo yum install imagemagick After that, it’s super easy. mogrify -resize 800 -rotate 90 image.jpg The above command would resize image.jpg to 800 pixels wide … Continue reading

Posted in Commands, Linux | Tagged , , , | Leave a comment

Node.js Trademarked — Next Up: Buyout (Sellout)

Well, Node.js has been trademarked to “protect the brand”. What does that usually mean? “We need a nice brand to sell.” http://blog.nodejs.org/2011/04/29/trademark/ Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it … Continue reading

Posted in Internet, Node.js / Socket.io | Tagged | Leave a comment

Blowing an LED … sort of.

Today I learned that you can supply just enough amperage to a light emitting diode to destroy the gases that emit photons but not destroy the circuit. I did it twice … just to make sure I wasn’t crazy of … Continue reading

Posted in Electronics | Tagged , , | Leave a comment

Cross Browser Gradient Shadowed Buttons

This is the CSS I use to make grey and blue buttons for fun. .shadow { -moz-box-shadow: 3px 3px 4px #969696; -webkit-box-shadow: 3px 3px 4px #969696; box-shadow: 3px 3px 4px #969696; /* For IE 8 */ -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color=’#969696′)"; … Continue reading

Posted in Internet | Tagged | Leave a comment

Simple PostgreSQL and data backup script for Linux bash

backup-script.sh #!/bin/bash export PGPASSWORD=SUPERSECRETPASSWORD thedate=`date –rfc-3339=date` echo "Making tarball for $thedate" filename="$thedate.tar.gz" `pg_dump -U postgres the_database > /var/www/db_dump.sql` tar czf /backups/$filename /var/www Above is a simple bash script to backup a directory after making a PostgreSQL data dump. I left … Continue reading

Posted in bash, Linux, PostgreSQL | Tagged , | Leave a comment

Blue Cross Blue Shield Kansas City BCBSKC Claim Fax Number

Searching high and low for this number I had to resort to actually calling someone. Is it still 1999? Fax your BCBCKC claims to: 816-395-3959 Attn: Written Correspondence Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit … Continue reading

Posted in Life | Leave a comment

Sharpy Lite PHP RAD Framework

So here is part of the Sharpy framework I have been developing with. Once I get things more mature, I will release the whole php rapid application development framework. Download sharpy-lite. Published under the MIT License. Basically just upload the … Continue reading

Posted in PHP | Tagged | Leave a comment

Node.js MVC – Starting an MVC setup for Node.js

server.js var http = require(’./lib/http’) var router = require(’./lib/router’) var fs = require(’fs’)   http.serve(router.dispatch) http.js var http = require(’http’)   exports.serve = function(handleRequest) { http.createServer(function (request, response) { handleRequest(request, response) }).listen(parseInt(process.env.PORT) || 8001) } lib/router.js var http = require(’./http’); … Continue reading

Posted in Internet, JavaScript, Node.js / Socket.io | Tagged , , | 1 Comment

Resizing and recoloring images with Python

import Image # I have the power!   theFile = "foo.png" # the file to start with   img = Image.open(theFile) # open the image resized = img.resize((75,75)) # resize the image r, g, b, alpha = resized.split() # get … Continue reading

Posted in Python | Tagged , | Leave a comment

Set static IP address in Ubuntu

You will need to edit your /etc/network/interfaces file sudo nano /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 Restart networking via sudo /etc/init.d/networking restart Bookmark … Continue reading

Posted in Internet, Linux, Operating Systems | Tagged , , | Leave a comment