There’s not much here right now, but more to come…
mouseHole Script
browserbar.rbOne-liners…
and frequently used commands I can’t seem to remember the exact syntax of, or that maybe if I write down will one day not require reading a man page to remember.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 sting
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
sed -e 's@\\@/@g' toNix.txt > wind.txt
- replaces all occurences of \ with /
find . %@2007-10-16
- search for files will date of 2007-10-16
scp plugin-cfg.xml username@hostname:~/
- copy file from one server to the home directory of another
rexec hostname "ls -al ~"
- execute some command on another server
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
Windows
services.msc
- opens the services console.
del SystemErr.log
- deletes SystemErr.log
CALL startSessionMgr.bat
- run a .bat file
Vi
:1
- beginning of file
esc K
- previous command
esc \
- auto complete
:s/string1/string2/
- _replaces all instances of string1 with string2
shift + H
- page up
:vert diffsplit file1 file2
- compare two files, displaying both side by side
