Learnings
I have a corporate job now—Java Development. It is all good. (^_^)
Having this corporate job means developing on Windows machine(s), which means for me brushing up on DOS commands.
attrib: change file permissions
path: print your path variable
services.msc: open the services console
netstat: lists ports in use
I don’t think there is a need for this command in NT, XP or Vista, but I used to use it all of the time.
doskey: allows you use commands previously entered
Additionally, I now need to start using dos2unix & unix2dos.
Other things that I have learned recently:- Shift + Alt + B in InkScape—> traces bitmap (i.e. gets path/shape of some existing bitmap object)
- I’m turning my dev box into a web server and am working on putting a stack together. Although I would love to try something cool and new like Nginx, I think I would be better off sticking with what I know (i.e. Apache). More about my first webserver later.
- I’ve started a document about the Freelance Web Development Process with questions for the client that I found on the web, as well as links to design resources.
- To find firefox shortcuts… enter the following line in the browser address bar: chrome://browser/locale/help/shortcuts.xhtml
- Convert m4a to mp3 with these two lines…
faad foobar.m4a
#converts m4a to wav
lame foobar.wav foobar.mp3
#converts wav to mp3
More, more, more…
- HTML space =
- Firebug
- Ctrl + Shift + C open web developer css
- Ctrl + Shift + L open command line
- Ctrl + Shift + K focus on search box
- Cygwin & the Find command: In order to use the find command in cygwin, you must make sure that c:cygwin\bin; is before SystemRoot\system32
- To deal with the firefox can’t center tables issue… add extra empty columns & have colspan across those columns
- Jsp files are converted into servlets that are then compiled into .class files; I am guessing that other frameworks work in a similar fashion.
- To my future selves, please remember that if you are getting a 500 error on a typo blog, make sure to check the file permissions for the log files at least thrice; they must be set to 755.
- Screengrab is a firefox extension that does screen captures. Cool!!!
- RAD7 requires that a target server be set for all projects.
- The easiest way to search for a jar file by package name is…
- if the jar is a websphere or homegrown jar, navigate in cygwin to a sufficiently small directory where you think the jar might be and execute the following command: find . -name \. | xargs grep this.is.your.package
- if the jar is open source, enable javacious & google the package name.
One-liners
and Frequently used commands I can’t seem to remember the exact syntax of. Nothin’ fancy.
Linux
find . -name \*.* | xargs grep search_string
- navigate to folder you would like to search, enter this command with the search string you would like to find and this command lists all files containing that string
ps x -Ho pid,args
- lists all of the processes running
find / -name gcc- finds all folders named gcc
sed '/$/,/' /home/Desktop/jessirae > /home/Desktop/jessirae2
- places a comma at the end of each line
paste -sd '\0' - /home/Desktop/jessirae2 > /home/Desktop/jessirae3
- The NEWLINE character of every line except the last line in each input file will be replaced with a separator
Ruby
"<a href=\"http://www.oldurl.com\">JessiRae.com</a>".
gsub(/(http?:\/{2})\S+\.(\w+)(\S+)/,"http://www.jessirae.com/blog/")
- global substitution replaces all instances of some expression in a string with some other string or performs some function on that string
require 'open-uri'
....
open(url) {
|page| page_content = page.read()
page_content
}
- returns html from specified webpage
