Free memory free-m
List processes with details ps -eo pid,cmd,lstart
Details on certain process ps -p $PID -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS
Free memory free-m
List processes with details ps -eo pid,cmd,lstart
Details on certain process ps -p $PID -o pid,vsz=MEMORY -o user,group=GROUP -o comm,args=ARGS
| $ab -n 10 -c 2 -p /Users/post_file.txt -T "multipart/form-data; boundary=1234567890" http://localhost/upload | |
| post_file.txt (use CRLF line-endings): | |
| --1234567890 | |
| Content-Disposition: form-data; filename="file.png" | |
| Content-Type: application/octet-stream | |
| Content-Transfer-Encoding: binary | |
| <base64 encoded file> |
| function stripWhitespaces(str){ | |
| return str.split("").filter(function(character){ | |
| return character !==" "; | |
| }).join(""); | |
| }; | |
| var x = stripWhitespaces("A B C") // x is ABC |
| <div | |
| <?php if ( $thumbnail_id = get_post_thumbnail_id() ) { | |
| if ( $image_src = wp_get_attachment_image_src( $thumbnail_id,'full') ) | |
| printf( ' style="background-image: url(%s);"', $image_src[0] ); | |
| }?> | |
| > |
| /* | |
| Problem: http://stackoverflow.com/questions/14555347/html5-localstorage-error-with-safari-quota-exceeded-err-dom-exception-22-an | |
| Solution: Workaround stores the same key/value pair with jquery.cookie and overrides the original get/set methods of localStorage. | |
| Dependency: https://github.com/carhartl/jquery-cookie | |
| */ | |
| function hasTrueLocalStorage(){ | |
| try { | |
| localStorage.setItem("foo", true); | |
| localStorage.removeItem("foo"); |