Restart Linux services

Linux (Ubuntu) No Comments »

To restart Apache:
sudo /etc/init.d/apache2 restart

To restart Network:
sudo /etc/init.d/networking restart

Restart MySQL:
sudo /etc/init.d/mysql restart

Reboot server from Terminal:
sudo reboot

Change screen resolution

Linux (Ubuntu) No Comments »

My Ubuntu 8.04 server was connected to a KVM and automatic detection defaulted to 800×600 resolution, making it impossible to even see complete dialog boxes when administring the server. Going to the Screen Resolution option didn’t give me any options to change it.
I found this command that will launch a monitor selection config screen where you are able to select something like Generic LCD 1024×768:

gksudo displayconfig-gtk

Remove password prompt on SSL key

Linux (Ubuntu) No Comments »

I came across this problem the first time installed an SSL certificate on a website using Ubuntu 8.04
The server asked for a password every time Apache was restarted (including reboot). After searching online I found the following solution:

cd /etc/apache2/ssl
cp server.key server.key.orig
openssl rsa -in server.key.orig -out server.key

(replace server.key and related values with actual filenames in your setup)

Multiple static IP addresses on one network card

Linux (Ubuntu) No Comments »

To bind multiple static IPs to the same netowork card on a Linux server I found this solution online and it works great for me:

sudo nano /etc/network/interfaces (add .100 and .101 as static IPs on this server)
# The primary network interface
auto eth0
iface eth0 inet static
        address 192.168.0.100
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1
auto eth0:1
iface eth0:1 inet static
        address 192.168.0.101
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1

(eth0 is the first physical network card)

UPS shipment tracking in ASP.net

.Net, ASP No Comments »

great info on tracking UPS shipment from you ASP.net application

http://www.velocityreviews.com/forums/t72633-ups-tracking.html

Streaming from a Web Server

Media, Servers No Comments »

this article from Microsoft is really thorough on how to setup your server and website to stream media.

http://www.microsoft.com/windows/windowsmedia/howto/articles/webserver.aspx

Encode, Deliver, Design: Getting a Grip on Flash Video

Adobe, Flash No Comments »

great article on delivering Flash and FLV files on your web:

http://www.adobe.com/devnet/flash/articles/flv_howto_03.html

Insert value into identity column in SQL

SQL No Comments »

before your “INSERT….” statement put this line:

SET IDENTITY_INSERT mytablename ON

Submit is not a function

JavaScript No Comments »

if you have a form with a “submit” button and you try to call the submit() function in JavaScript, you will get this error:
submit is not a function

to get around this error, change your button type from “Submit” to a normal button. Now your code will work.

JavaScript String Object Reference

JavaScript No Comments »

full details of String Object in JavaScript

http://www.w3schools.com/jsref/jsref_obj_string.asp

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in