-
Senior Member
registered user
pastebin.ca perl script to upload files or clipboard content
One of the very first things I do, to a new persistant home install... is install the pastebin.ca perl script - paste2pastebin.pl
It makes life alot easier to paste an error message to someone who's trying to help me out. A collaboration tool.
Once you have it installed, say in /usr/local/bin/paste2pastebin.pl you can paste a file or an error message you got somewhere straight from the clipboard.
To paste a named file:
Code:
paste2pastebin.pl /path2/filename
To paste the contents of Klipper, make sure the hyphen is the last char of the cmdline, and then press shift-insert (or X's middle click. ) Ignore what Konsole shows you... it really did paste the whole thing... and then don't forget to hit Ctrl-D to end the input. You can even continue to type stuff on the bottom... after you pasted.
Code:
paste2pastebin.pl -
First get...
http://pastebin.ca/download/paste2pastebin.pl and save it to somewhere like /usr/local/bin.
Edit: pastebin.ca gave me an error when I used wget at that url... so here is the proper link to use when trying to get the script.
http://pastebin.ca Tools Section
You will probably also want to change it's permission to 755 and ownership to root. In a console...
sudo chmod 755 /usr/local/bin/paste2pastebin.pl
sudo chown -c root:root /usr/local/bin/paste2pastebin.pl
Now you'll also have to install a perl module, WWW/Mechanize.pm.
If you haven't installed any modules before... and that is likely with Knoppix...
sudo perl -MCPAN -e shell
I accepted the defaults except for the -j3 line... which is for dual cores...
and I finally wound up at a perl prompt. Then
install WWW::Mechanize
install Getopt::Long
Edit:Not so fast... alot has changed since I posted this...
before you install any modules... it is best to upgrade cpan itself... with
Code:
install Bundle::CPAN
reload cpan
o conf commit
quit
... then restart it and make sure it doesn't complain.
perl -MCPAN -e shell
I did this as root, and selected "follow" for the dependancy option... and this time it worked. WWW::Mechanize was broken for a while... because some "test site", computers4sure.com changed their website around. Any problems you get... here is where to start looking or complaining ![Smile](images/smilies/icon_smile.gif)
Google Code WWW::Mechanize bug list
Now in a console
lsmod | paste2pastebin.pl
returns... Your paste URL is: http://pastebin.ca/979356
Leaving a paste on a server forever is wasteful in my opinion... so
lsmod | paste2pastebin.pl --expiry="30 minutes"
is a quickie that expires in 30 minutes.
Which can also be any of these options...
Expiry options:
*/Never, 5 minutes, 10 minutes, 15 minutes, 30 minutes, 45 minutes,
1 hour, 2 hours, 4 hours, 8 hours, 12 hours,
1 day, 2 days, 3 days,
1 week, 2 weeks, 3 weeks,
1 month, 2 months, 3 months, 4 months, 5 months, 6 months,
1 year.
Since the script uses a default name of clueless... adding --name=yourname will give you an added bit of dignity. ![Smile](images/smilies/icon_smile.gif)
I did it all by ading an alias in /etc/profile, but you could just edit the script itself.
alias p2pbin='paste2pastebin.pl --expiry='\''1 month'\'' --name=johnrw'
More details can be found on a similar post here:
http://www.novell.com/coolsolutions/tools/16545.html
Similar Threads
-
By brass in forum General Support
Replies: 0
Last Post: 02-02-2007, 08:47 PM
-
By DouglasShannon in forum General Support
Replies: 0
Last Post: 01-02-2007, 10:09 PM
-
By bokaroseani in forum Networking
Replies: 1
Last Post: 10-20-2005, 09:24 PM
-
By marco75 in forum Ideas
Replies: 0
Last Post: 05-12-2004, 06:38 AM
-
By Dave_Bechtel in forum General Support
Replies: 0
Last Post: 06-04-2003, 11:54 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![DELL PowerEdge R630 8SFF Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4xRJ45 picture](/store/img/qfQAAOSw9XRklkNR/s-l225//DELL-PowerEdge-R630-8SFF-Server-2x-E5-2680v4-2-4GH.jpg)
DELL PowerEdge R630 8SFF Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4xRJ45
$394.00
![Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD picture](/store/img/CaAAAOSwEjBmj~ML/s-l225//Dell-PowerEdge-R630-Server-2x-E5-2680-V4-28-Cores-.jpg)
Dell PowerEdge R630 Server 2x E5-2680 V4 = 28 Cores S130 32GB RAM NEW 480GB SSD
$256.99
![1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports picture](/store/img/fxsAAOSwZD5l6PSG/s-l225//1U-BareMetal-pfsense-opnsense-Router-Firewall-DNS-.jpg)
1U BareMetal pfsense opnsense Router Firewall DNS Server 6x 10GB Ethernet Ports
$149.00
![Dell Poweredge R730xd LFF 14-Bay 2U Server | Choose Your CPU & RAM Config picture](/store/img/CdkAAOSwY0BmYMoF/s-l225//Dell-Poweredge-R730xd-LFF-14-Bay-2U-Server-Choose-.jpg)
Dell Poweredge R730xd LFF 14-Bay 2U Server | Choose Your CPU & RAM Config
$454.99
![Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330 picture](/store/img/ZD0AAOSwm41mOZYw/s-l225//Dell-PowerEdge-R630-Server-2x-E5-2640v3-2-60Ghz-16.jpg)
Dell PowerEdge R630 Server 2x E5-2640v3 2.60Ghz 16-Core 64GB H330
$182.65
![HP ProLiant DL360 G9 Server 2x E5-2690v3 2.60Ghz 24-Core 256GB P440ar picture](/store/img/HBEAAOSwasRkPVvF/s-l225//HP-ProLiant-DL360-G9-Server-2x-E5-2690v3-2-60Ghz-2.jpg)
HP ProLiant DL360 G9 Server 2x E5-2690v3 2.60Ghz 24-Core 256GB P440ar
$302.90
![Dell PowerEdge T430 Server w/ Intel Xeon E5-2650 V4 & 1100W PSU (2X) - NO RAM picture](/store/img/1Q8AAOSwgRNmkVI5/s-l225//Dell-PowerEdge-T430-Server-w-Intel-Xeon-E5-2650-V4.jpg)
Dell PowerEdge T430 Server w/ Intel Xeon E5-2650 V4 & 1100W PSU (2X) - NO RAM
$314.99
![SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount picture](/store/img/MFoAAOSwQYhmavYc/s-l225//SuperMicro-Server-505-2-Intel-Atom-2-4GHz-8GB-RAM-.jpg)
SuperMicro Server 505-2 Intel Atom 2.4GHz 8GB RAM SYS-5018A-FTN4 1U Rackmount
$202.49
![Dell PowerEdge R720 2U Server 2x Xeon E5-2670 2.60GHz 256GB RAM NO HDD NO OS picture](/store/img/olUAAOSwyGpmkW5e/s-l225//Dell-PowerEdge-R720-2U-Server-2x-Xeon-E5-2670-2-60.jpg)
Dell PowerEdge R720 2U Server 2x Xeon E5-2670 2.60GHz 256GB RAM NO HDD NO OS
$219.99
![Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB picture](/store/img/7XkAAOSwnhFkFNvU/s-l225//Dell-Poweredge-R630-2x-Xeon-E5-2680-v4-2-4ghz-28-C.jpg)
Dell Poweredge R630 2x Xeon E5-2680 v4 2.4ghz 28-Cores / 128gb / H330 / 2x 1TB
$334.99