Latest 100 public snipts »
rendrag's
snipts
showing 1-7 of 7 snipts
-
∞ Recursively find text in files
find . -name "*.html" -exec grep -i -H " keyword(s) " {} \; >> ~/output/to/file.txt
-
∞ htaccess redirect all traffic to homepage
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . http://domain.tld/index.php [L] </IfModule>
-
∞ See which ports are open
lsof -P | grep ':' -
∞ Convert XML docs to HTML
// Assumes xalan is installed on machine find . -name '*.xml' | xargs -I PARAM java org.apache.xalan.xslt.Process -IN PARAM -XSL dir/file.xsl -OUT PARAM.html -
∞ Using wget to see if a server is serving up an HTML page from command line.
wget -SO - http://domain.tld:port/dir/
-
∞ download a website
wget -r -np -w 1 http://domain.tld
-
∞ Change image file width
find . -name '*.JPG' | xargs -I PARAM echo sips --resampleWidth 500px PARAM


