There’s not much here right now, but more to come…
Github
Me on githubMy work with DevChix on Google Code
Electric Sheep on Android
first stab at electric sheep screen saver for androidmouseHole 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
. ~/.profile
- refresh profile
chkconfig vmware --list
- see a list of vmware services (or other system services) and whether they are on or off
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
vi /etc/vim/vimrc
- edit vim configurations/display
Git
git checkout -f
- kind of like “replace with latest from respos” or similar to rebase in other version control.
git add src/*
- select files that you want to commit
git commit -m 'initial check-in'
- commit
git push
- push what you have committed to the repository
git checkout origin/gh-pages -b gh-pages
- fetch your github project pages locally
Other
/opt/lampp/bin/mysqldump --u=USER --password=password databaseName > dump.sql
- take mysqldump
