BASH, C-Shell, etc.

September 28th, 2011

I was trying to figure out how to change my default shell from CSH to BA$H for my ODU CS login after doing some customization on my .bashrc file. If you’re in the same boat as me, a few simple changes will take care of things. This can all be done without root access.

  • $ echo $SHELL # find out what shell you are currently using, gives me something like /usr/local/bin/tcsh
  • bash # to switch to a BA$H terminal. exit to your csh
  • If a csh ~/.login doesn’t exist, create one and put the command exec bash in it. You could also use the full path to the shell you want to use
  • Run source ~/.login to restart your csh with the new rule… it should skip you over to bash instantly

This got me far enough to get a terminal but not far enough to use Vi as I would like to and expect to. I use Putty, since most of the time I have to be on a Windows computer. Times are changing though and hopefully soon I can drop it entirely in favor of Ubuntu. If you are having trouble with numbers, arrow keys, the insert key, etc. try some of these helpful hints:

  1. Open putty and load your session
  2. Go to terminal -> features and check “disable application keypad mode”
  3. echo $TERM and make sure that Putty and your server are using the same type. vt100 is the most common
  4. set term/device=vt100
  5. Load your Putty session and go to Connection -> Data and enter “vt100″ (without quotes) or whatever type you decided on. Optionally you can enter your username here as well so you only type your password on login.
  6. Under Terminal -> Keyboard, set “Ctrl-H”, “Standard”, “ESC[n~”, and the default for everything else on that panel
  7. For the rest, follow the directions here.

… this is still a post in progress. Sadly, I’m still not working with a full deck of Vi.

Enjoy!

Web Developer’s Glossary

September 23rd, 2011

Sometimes people misuse common web terms.  Other terms people are completely unaware of.  It’s important to know your web technologies emboldened text book highlights.  Here are a few.

  • Vaporware: software made of up a collection of “trick mirrors” and “fog” to fool others into thinking there is actually a product. Eg.: “I just sold our client a WordPess site with a free theme.  It was on cPanel hosting, so all I had to do was click install.  They were very impressed and I made so much $$$!” ~ Credits to Melissa Baumann for this gem
  • Spaghetti Code: software that is often use to keep a job since there is nobody on earth who understands it as well as its inventor.  developers often use this as a way of shielding themselves from the outside world. Eg.: “I just took a nice nap in my warm spaghetti code while 9/11 happened and Daleks almost destroyed the entire universe.” ~ Credits to Melissa Baumann for this wonderful term
  • Copy/Paster: a “programmer” that accomplishes at least 75% of his work by copying and pasting bits of code found on Google, without any reasoning abilities to determine original code quality or the skill level to rationally merge scripts from multiple sources
  • Requirements Document: stick figures, scribbles, plus a ketchup stain–usually delivered on <document type=”knapkin-4.01v3″/>
  • Social Media Expert: i kan haz FaceBook all dai 4 monie$.  i has t3h tw33ts!!!
  • Custom CMS: often used as a threat, this is usually a way to keep clients from managing their content along with a high dollar reoccurring maintenance bill
  • Web 2.0: a way to make the Internet still sound cool after the dot com crash, as in “Remember Web1.0, guys?  It’s like that but now with more cheerleaders!”
  • Web 3.0: Web 3.0 is often seen coming back from the future to battle its younger self, Web 2.0, in a cage match, generally filled with bologna which is sometimes substituted with SPAM
  • Responsive Design: used to characterize a website that “listens” to the emotional needs of the end user, and then suggests an appropriate drink to match their specific mood, usually something pink
  • SEO: usually this refers to eating babies in a dark closet and not cleaning up afterwards before a requirements analysis meeting
  • Microsite:  similar in all ways to a standard website, except… well, similar in all ways to a standard website
  • API: black magic used to conjure up solutions to really complex problems that are not clearly defined, having a desired end result described as a “requirements document”; synonymous with <beginJohnWilliams>”a long time ago in a database far far away”<endJohnWilliams>; common usage: “Isn’t there an API for that?”
  • SAAS (3): a cool OO kind of CSS syntax with some PHP/RUBY/C or other parser; software as a service; ur mom
  • BA$H: a tool used for hammering, but in a computer sciency type of way

Use Putty to Store and Manage Your MySQL Tunnels

September 21st, 2011

I’ve been manually creating my tunnels for the same connections over and over again for the longest time. It gets old. I just realized Putty can do this for me. You must remember to go back to the main Session page to click “save” since there isn’t a save button on all pages–do this prior to opening a session. The follow up pic is of a typical MySQL Administrator setup to use with the tunnel.

Putty
MySQL Administrator

Sencha Touch Checkbox Defaults

September 19th, 2011

Sencha Touch is amazing… simply amazing.  One of the things I’ve found very unintuitive for form panel configuration objects, though, is the checkbox and how to set a default value.

For most field types, you simply type value: 'some value'. With the checkboxfield, you instead have to use value: true to indicate what the value of a checkbox is when it is checked. The default state is then set by checked: true. It makes sense, but isn’t intuitive and perhaps a bit unnecessary to have both.

.htaccess Changing the document root from public_html to a subfolder

March 6th, 2011

If you’ve ever needed to host your files for a site in a subfolder such as “public_html/mysubfolder/” as if it were “public_html/” so that your URL displayed is (for example) “http://www.epiphanydigital.com/” instead of “http://www.epiphanydigital.com/mysubfolder”, then you may want to try something like the following htaccess black magic:

RewriteEngine On
RewriteRule ^$ /mysubfolder/ [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/mysubfolder/
RewriteRule ^(.*)$ /mysubfolder/$1
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule ^epiphanydigital.com/(.*[^/])$ http://www.epiphanydigital.com/$1/ [R=301]

Now, a better way is to just modify your VirtualHost record directory on a site by site basis, but if you’re like me and you’re on a shared host, you just don’t have access to do this.  An .htaccess rewrite rule will cost slightly more overhead than a VirtualHost record.



©2005-2012 Blog – Epiphany Digital is proudly powered by Badgers and Web Design is by Epiphany Digital
Entries (RSS) and Comments (RSS). 33 queries. 1.062 seconds.

Thank you for visiting this site. The web fairy will visit you in your sleep... you know, I was going somewhere with this, but it really doesn't have as much innocent charm as the tooth fairy, especially when I picture the web fairy as someone much like the Simpsons' Comic Book Guy but with wings. It's just not something I want.