Change your default SSH username
If you’ve not had your own choice of username on your machine (for example, if your company imposes a username policy), you can set up a different default username for SSH in ~/.ssh/config:
Host *
User chris
If you’ve not had your own choice of username on your machine (for example, if your company imposes a username policy), you can set up a different default username for SSH in ~/.ssh/config:
Host *
User chris
export CLICOLOR=1;
Chrome 4 currently appears to be the only browser to implement the W3C’s border-radius property: http://www.w3.org/TR/2002/WD-css3-border-20021107/#the-border-radius
border-top-left-radius: 1em;
border-top-right-radius: 1em;
You can produce the same result using proprietary attributes in Firefox 3.5 and Safari 4:
/* Firefox */
-moz-border-radius-topleft: 1em;
-moz-border-radius-topright: 1em;
/* Safari */
-webkit-border-top-left-radius: 1em;
-webkit-border-top-right-radius: 1em;
Source: http://www.css3.info/preview/rounded-border/
To copy files from one directory, you might usually do:
cp dir/* anotherdir/
If you try to do this with a particular large number of files, you may encounter the ‘argument list too long’ error. In this case you can use:
find . -exec cp {} /path/to/anotherdir/ \;
More approaches at: http://www.linuxjournal.com/article/6060
“The web is too important for society to be in the hands of any one vendor”- Bruce Lawson, Opera HTML5 is more a collection of new technologies than a single new standard - we can start using parts of it today. You can use Moderizr to check what HTML5/CSS3 features are available in your browser. You can see it in action at FindMeByIP.
#!/bin/bash
# Send an email when disk space used reaches a certain threshold
FS="/"
SERVER_NAME="linux02"
EMAIL="user@example.com"
THRESHOLD=95
OUTPUT=($(LC_ALL=C df -P ${FS}))
CURRENT=$(echo ${OUTPUT[11]} | sed 's/%//')
[ $CURRENT -gt $THRESHOLD ] && df -h | mail -s "$SERVER_NAME disk space alert: $CURRENT% full" $EMAIL
I’ve set this up as a cron job run at 3am daily:
0 3 * * * ./root/maintenance/check_free_space.sh
Based upon http://www.cyberciti.biz/faq/mac-osx-unix-get-an-alert-when-my-disk-is-full/
To find out, load the page in question and then paste this into your address bar:
javascript:alert(document.compatMode);
‘backCompat’ is quirks mode; ‘css1Compat’ is standards mode.
More info on quirks mode: http://www.quirksmode.org/css/quirksmode.html
By default, Mobile Safari assumes that the page is 980px wide and sizes the viewport accordingly. If your page is significantly smaller, you can use the viewport meta tag to configure the viewport dimensions. For example:
Detailed documentation is available at developer.apple.com. In portrait mode, the viewport is 320px wide; in landscape mode, it’s 480px wide.
This snippet will rewrite all requests to the page iphone.html when viewed on iPhone or iPod Touch. Requests for .gif and .css files are not rewritten, so you can include stylesheets and images in your iPhone-specific page.
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} .*Mobile.*Safari
RewriteRule !\.(gif|css)$ /iphone.html [L]
Source: http://webdirect.no/mobile/apache-rewrite-rule-for-iphone-users/
To find files created in the last 30 minutes:
find -cmin +30