Clear DNS lookup / IP address cache on OS X Tiger
lookupd -flushcache
2734 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
lookupd -flushcache
<script type="text/javascript" src="clear-form-input.js">script>
<script type="text/javascript"> // CDATA[ var el = document.createElement("input"); el.setAttribute("id", "clearButton"); el.setAttribute("type", "button"); el.setAttribute("value", "Clear"); document.getElementById("deliciousFormDiv").appendChild(el); addEvent(el, 'click', function(){ clearForm('delicious');} ); // ]]> script>
function clearForm(formIdent) { var form, elements, i, elm; form = document.getElementById ? document.getElementById(formIdent) : document.forms[formIdent]; if (document.getElementsByTagName) { elements = form.getElementsByTagName('input'); for( i=0, elm; elm=elements.item(i++); ) { if (elm.getAttribute('type') == "text") { elm.value = ''; } } } // Actually looking through more elements here // but the result is the same. else { elements = form.elements; for( i=0, elm; elm=elements[i++]; ) { if (elm.type == "text") { elm.value =''; } } } } function addEvent(elm, strEvent, fnHandler) { return ( elm.addEventListener ? elm.addEventListener( strEvent, fnHandler, false) : elm.attachEvent( 'on'+strEvent, fnHandler) ); }