Skip to main content

Posts

Showing posts from 2012

Stuff some guy always installs on debian

The stuff I always install on a Debian box « boltblog Sitting here installing a brand new box, I look through what I use on other machines and figure out a list of things I want to have installed on any box I'm on. Here's the list so far, in no particular order: vim - my favorite text editor  ssh - the secure shell server and client - a must.  realpath - gets the full pathname of a given file. very useful in scripts  autossh - keeps ssh connections open on its own. very useful for ssh tunnels.  sysstat - various performance tools, like mpstat to see the individual cpu usage in an smp setup sudo - allows normal users to execute things as root. mind-bogglingly useful  preload - tracks which applications are frequently used and tries to keep them in memory to improve startup times  lshw - prints way more information about your machine than you really need  sysv-rc-conf - a nice tool to set at which runlevels the machine should start and stop services  console-setup -

Vandyke SecureCRT and correct emulation for Linux

Isn't it annoying, You've forked out the money for SecureCRT and linux ends up looking awful (compared to the free putty) when you run ansi graphics screens. The solution is simple. In SecureCRT 6.7 Bring up the session options, select the "Terminal" tree,  select "Appearance",  then change the Character encoding to UTF-8  In Secure CRT 4.0.9 Bring up the session options: Select the "Emulation" tree,  select "Advanced",  then change the Character encoding to UTF-8 

Google Groups and Zend Framework

Zend Framework allows you to interact with Google Lists ..  see below I have to check this out, is this the same as Google Groups ? Interacting with email lists Email lists allow several users to retrieve email addressed to a single email address. Users do not need to be a member of this domain in order to subscribe to an email list provided their complete email address (including domain) is used. Each email list on a domain is represented as an instance of Zend_Gdata_Gapps_EmailListEntry. Creating an email list Email lists can be created by calling the createEmailList() convenience method: $gdata->createEmailList('friends'); Email lists can also be created by instantiating EmailListEntry, providing a name for the list, then calling insertEmailList() on a service object to upload the entry to the server. $list = $gdata->newEmailListEntry(); $list->emailList = $gdata->newEmailList('friends'); $list = $gdata->insertEmailList($list);

Mime Types for Office 2007 documents and IIS

http://www.bram.us/2007/05/25/office-2007-mime-types-for-iis/ http://technet.microsoft.com/en-us/library/ee309278(v=office.12).aspx up vote 27 down vote accepted Yes, it's just an IIS setting: by default,  it will only serve files for which the extension matches a defined MIME type . To allow .docx files to be downloaded, follow the steps from the KB article linked above: Open the IIS Microsoft Management Console (MMC), right-click the local computer name, and then click Properties. Click MIME Types. Click New. In the Extension box, type the file name extension that you want (in this case, .docx). In the MIME Type box, type application/vnd.openxmlformats-officedocument.wordprocessingml.document  (thanks to @web developer for pointing out this MIME type, which supercedes the 'application/msword' from my original answer). Apply the new settings. Note that you must restart the World Wide Web Publishing Service or wait for the worker process to recycle for t

PARAPROSDOKIANS

PARAPROSDOKIANS:  Figure of speech in which the latter part of a sentence or phrase is surprising or unexpected; frequently used in a humorous situation. "Where   there's a will, I want to be in it," is a type of  paraprosdokian .        1. Do not argue with an idiot. He will drag you down to his level and beat you with experience.        2. The last thing I want to do is hurt you. But it's still on my list.        3. Light travels faster than sound. This is why some people appear bright until you hear them speak.       4. If I agreed with you, we'd both be wrong.       5. We never really grow up; we only learn how to act in public.       6. War does not determine who is right - only who is left.       7. Knowledge is knowing a tomato is a fruit. Wisdom is not putting it in a fruit salad.       8. Evening news is where they begin with 'Good Evening,' and then proceed to tell you why it isn't.       9. To steal ideas from one person is plagiarism. T

Counting files in the current directory using linux

To determine how many files there are in the current directory, put in  ls -1 | wc -l . ls -1 (ie: a one): prints in one column and avoids the display of the total line (which would otherwise increase the line count). "total" indicates the number of file system blocks used by files in the directory. wc -l (ie: an L): counts the lines (as switched by the L, not interested in characters or words) From:  http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x700.html

LCD TV mounting gear

I found this great place online for LCD mounting gear http://q-tee.com.au/ I like their AV furniture and other stuff that is suitable for VC trolleys

Fold Command

fold: Wrap Text File / Line / Words To Fit in Specified Width This demonstrates a bash command line tool, an equivalent php tool would be wordwrap. fold is really nifty command line utility to make a text file word wrap. This is useful for large number of text files processing. There is no need to write a perl / python code or use a word processor. fold command syntax fold -sw {COUNT} {input.txt} > {output.txt} Wrap input lines in each input.txt, writing to standard output.txt. Where, -s : break at spaces -w : {COUNT} use COUN} as WIDTH columns instead of default 80. For example, following command will wrap input.txt at 60 width columns: $ fold -sw 60 input.txt > output.txt A large number of files can be processed using a shell loop: for i in *.txt do fold -sw 65 $i > $i .output done

setting file permissions in linux

Had a problem recently where I needed to share sftp uploads to linux amongst different users. Step 1: Make sure the users primary group is the shared group newgrp groupname http://tldp.org/LDP/intro-linux/html/sect_03_04.html Step 2: You need to know about umask. You can edit it via .bashrc, but that wont help you out for sftp Step 3: Modify sshd_config, so that it sets umask correctly for the sftp session http://jeff.robbins.ws/articles/setting-the-umask-for-sftp-transactions

Bravia EX720 USB Supported Video Formats