| |
TechNotes
Page history last edited by peterga 4 mos ago
CMD Syntax
- Copy - Right-click/Mark/highlight/Enter
- Turn on Properies/Quick Edit Mode to copy with just highlight/enter and paste with right click
- Repeat last command - up arrow
- Mounting share drive
- \10.xx.xx.xxplatform_support
- Username: hostingu154314h
- Press enter to continue - pause
- Arguments to bat files (including drag and drop) = %1 %*
- net use - tells you what partitions you have mounted
Misc Utilities
- gunzip -c (sends to standard out)
- pscp -pw mypassword wamu-logo.jpg u154314@10.174.17.42:
- Copy local file to server (don't forget colon at end, optionally follow colon with path)
Shellscript
Scripts
General
- To input one line at a time instead of one word at a time (e.g. "for line in")
- set/debug options
- set -vx # prints commands before execution
- set -e # terminate the script at first error
- set -u # unset variables are fatal errors
- Sort file based on field 2 with fields delimited by commas
- Same sort but use numeric values in sorting
- Convert text to all uppercase
- Loop through file one line at a time
while read line
do
(do stuff to line)
done < inputfile
awk
- Newline conversion
- IN UNIX ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format
- awk '{sub(/\r$/,"");print}' # assumes EACH line ends with Ctrl-M
- IN UNIX ENVIRONMENT: convert Unix newlines (LF) to DOS format
- awk '{sub(/$/,"\r");print}
- IN DOS ENVIRONMENT: convert Unix newlines (LF) to DOS format
- IN DOS ENVIRONMENT: convert DOS newlines (CR/LF) to Unix format
- Cannot be done with DOS versions of awk, other than gawk:
- gawk -v BINMODE="w" '1' infile >outfile
- Use "tr" instead.
- tr -d \r outfile # GNU tr version 1.22 or higher
- concatenate every 5 lines of input, using a comma separator between fields
- awk 'ORS=%NR%5?",":"n"' file
- print the first three fields of a csv file, (with no " around values)
- awk -F"," '{gsub(/"/, ""); print $1 " " $2 " " $3}'
- Do the same but convert first field to uppercase and 3rd to lowercase
- awk -F"," '{gsub(/"/, ""); print toupper($1) " " $2 " " tolower($3)}'
Cygwin, Windows quirks
- CygwinStartupScript
- vim replacement
- :g,x,s,,y,g - doesn't work
- :g,x,s//y/g - works
- Commands with duplicates in path: find, sort
Vservers/Hosting
- Blocking relayed spam
- save emails to disk and grep (originating) IP
- http://216.122.248.78/vadmin/
- Mail Management / Access Control / Add Access Rules
- Add DISCARD rule for IP range, e.g. 64.224.219.
- Restart sendmail
Web Utilities
AD queries
- dsquery user -name u154314 | dsget user -memberof | find /i "bfss" | dsget group -members
- Get object for me | Find groups I'm a member of | grep bfss | List the members of that group
- dsquery group "OU=Mail Lists,OU=WAMU Mail,DC=us,DC=wamu,DC=net" -name "DL ecommerce technology Minstry of Information*" | dsget group -members
Networking, IP
Shinn, William M. says:
here's your $20,000 subnet calculator.... but I'll give it to you for free:
CIDR/bit mask:25 26 27 28 29 30 31 32
Decimal mask:128 192 224 240 248 252 254 255
number of hosts per subnet: 128 64 32 16 8 4 2 1
Andrijeski, Peter says:
So stuff in the 252 range can only contain 4 hosts?
Shinn, William M. says:
yup
Shinn, William M. says:
if the mask is 255.255.255.252, that network will only have 2 hosts.
the first address will be the subnet address, then 2 host addresses, then a broadcast address
that's why on serial links between you and a provider (for example, at least in very small
networks) you usually get a .252 subnet... subnet address, providers router (ser0) and your
router (ser0), then the broadcast address
then they route your public IP ranges to your serial interface
iPod
- Fast forward: Hit center button to toggle bar
Fonts
- Installing on Gateway: Control Panel / Fonts / File / Install Fonts (downloads in /_install/fonts/ )
Windows
- Stopping Services: File Explorer / My Computer / right-click: Manage / Services and Applications / Services / right-click on service / Stop
Texting Addresses
| Alltel |
[10-digit phone number]@message.alltel.com
Example: 1234567890@message.alltel.com |
| AT&T (formerly Cingular) |
[10-digit phone number]@txt.att.net
[10-digit phone number]@mms.att.net (MMS)
[10-digit phone number]@cingularme.com
Example: 1234567890@txt.att.net |
| Boost Mobile |
[10-digit phone number]@myboostmobile.com
Example: 1234567890@myboostmobile.com |
| Nextel (now Sprint Nextel) |
[10-digit telephone number]@messaging.nextel.com
Example: 1234567890@messaging.nextel.com |
| Sprint PCS (now Sprint Nextel) |
[10-digit phone number]@messaging.sprintpcs.com
[10-digit phone number]@pm.sprint.com (MMS)
Example: 1234567890@messaging.sprintpcs.com |
| T-Mobile |
[10-digit phone number]@tmomail.net
Example: 1234567890@tmomail.net |
| US Cellular |
[10-digit phone number]email.uscc.net (SMS)
[10-digit phone number]@mms.uscc.net (MMS)
Example: 1234567890@email.uscc.net |
| Verizon |
[10-digit phone number]@vtext.com
[10-digit phone number]@vzwpix.com (MMS)
Example: 1234567890@vtext.com |
| Virgin Mobile USA |
[10-digit phone number]@vmobl.com
Example: 1234567890@vmobl.com |
Firefox
FirefoxSearchPlugins
Google Chart

<img src="http://chart.apis.google.com/chart?cht=bvs&chs=400x300&chd=t:28,43,19,27,46,44,26,64,102,110,116,78,68&chxt=x,y&chxl=0:|96|97|98|99|00|01|02|03|04|05|06|07|08|1:|0|60|120&chco=4d89f9,c6d9fd&chbh=a&chds=0,120">
TechNotes
|
|
Tip: To turn text into a link, highlight the text, then click on a page or file from the list above.
|
|
|
|
|
Comments (0)
You don't have permission to comment on this page.