Author: <span class="vcard">g33kadmin</span>

Disable PDF protection

Disable PDF protection using two simple commands in Ubuntu Use two simple commands to convert a protected pdf into an unprotected pdf. Here in this example i assume the protected pdf file name to be ‘protected.pdf’. Now open your terminal and type. pdftops protected.pdf out.ps pstopdf out.ps out.pdf The out.pdf will be your unprotected PDF….


Send stderr & stdout to same file

Send standard error and standard out to the same file This article may seem odd to those who have read a few of my others. However, this is by far my highest ranking search term. Thus I thought I would write up an simple and explicit explanation. The following will send the output of ls…


Quick performance site test

time curl -s “http://g33kinfo.com?[1-1000]” real 0m0.017s user 0m0.006s sys 0m0.006s and another one from bashcurescancer/com #!/bin/bash # Author: see http://bashcurescancer.com/improve-this-script-win-100-dollars.html # Modified and extended by “Chris F.A. Johnson” , 2007-02-25 # Web site: http://cfaj.freeshell.org ## Features: ## Will use non-standard port if specified in URL ## (e.g., http://example.com:8080/index.html) ## Checks for successful connection ## Moderately…


Mdadm Cheat Sheet

Mdadm Cheat Sheet Mdadm is the modern tool most Linux distributions use these days to manage software RAID arrays; in the past raidtools was the tool we have used for this. This cheat sheet will show the most common usages of mdadm to manage software raid arrays; it assumes you have a good understanding of…


Create many files of random size

I am not sure why you would want to use a command like this but I am sure there is some reason for it, so here ya go; $ for i in $(seq 1 1000); do let “size = ($RANDOM/100)”; dd if=/dev/urandom \ of=file-$i count=$size 2>/dev/null;done Maybe if you want to prank your cubemate or…


Serve current directory temporarily via web

python -m SimpleHTTPServer 9914 This command runs a simple single-threaded web server on any port you choose as the current user. Logging is to stdout/stderr, and a ctrl-c will stop the server. Great for temporarily sharing a directory. All data in the folder will be visible, including (dot) .files and they can be downloaded, but…


Auto Firewall IPs with high connection counts

via Paul (lovepig.org): netstat -npa –inet | grep :80 | sed ‘s/:/ /g’ | awk ‘{print $6}’ | sort | uniq -c | sort -n | while read line; do one=`echo $line | awk ‘{print $1}’`; two=`echo $line | awk ‘{print $2}’`; if [ $one -gt 100 ];then iptables -I INPUT -s $two -j DROP;…


Linux Instructions for installing Diet Chromium OS to USB

Download and extract the chromiumos.img and run the following command in the same directory as the file, where X is the device name of your USB drive. sudo dd if=chromiumos.img of=/dev/X bs=4M Once the command finishes, you can then boot from the USB drive. FAQ: —————————————- Q: How big a USB drive does this require?…


Easier-to-read MySQL “show table status”

mysqlshow –status yourdbnamehere |sort -n -k10 |awk -F\| ‘($6 !~ /0/)’ |awk -F\| ‘{print $2 ” ” $6 ” ” $7 ” ” $14}’ |egrep -v “^ ” Name Rows Avg_row_length Update_time wp_links 1 128 2009-06-14 04:30:57 wp_comments 11 536 2009-12-01 02:43:25 wp_terms 12 30 2009-10-26 00:37:54 wp_term_taxonomy 13 47 2009-12-01 01:23:39 wp_users 13 118…


WHOIS visiting your site?

I’m fond of WHOIS data for getting an idea who’s visiting a site, though most WHOIS servers return data that’s full of disclaimers and irrelevant data. Rather, I much prefer Team Cymru’s batch WHOIS lookup server, whois.cymru.com. First, extract your IPs: F=ips.out ; echo “begin”>>$F ; echo “verbose”>>$F ; awk ‘{print $1}’ tech-access_log |sort |uniq>>$F…


WP2Social Auto Publish Powered By : XYZScripts.com