Sharing

Share Code Snippets Easily From the Command Line

This is a great tip I found at commandlinefu to easily share code snippets write from the command line.

First, you may want to add this to your aliases file:

1
alias share='curl -F "sprunge=<-" http://sprunge.us | xclip'

(If you don’t have the xclip program, you can easily install it from your package manager.)

Now, say that you have a c program named “hello.c”, to share it, type this (after reloading your aliases file of course):

cat hello.c | share

Now, the code is already in the internet, and the URL is in your clipboard. Go to firefox and click the middle mouse button in the URI area. You’ll see a URL similar to this:

http://sprunge.us/BaFS



To view the code with syntax highlighting and line numbers, just append “?c? (or “?lang” where ‘lang’ is the relevant programming language). So the final URL should look like this:

http://sprunge.us/BaFS?c

Enjoy ;)

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to Reddit Post to StumbleUpon

Tags: , , ,

Saturday, June 13th, 2009 Programming No Comments

Google’s Tip Jar

A (new?) service by google, which is a part of Google Moderator, is the “Tip Jar”.

“Tip Jar” is a collection of tips, submitted by the users, and categorized into different categories: Home, Work, Tech, Finance etc…

Users can submit new tips, and vote for tips submitted by others. The tips are displayed according to their popularity (which might be bad for new tips, since it will be harder to discover them).

Anyway, it looks like a nice service by Google, and another step towards making information available for everybody (who can afford a PC and internet connection).

Check it here.

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to Reddit Post to StumbleUpon

Tags: , ,

Saturday, March 7th, 2009 Google No Comments

Use Codepad to Save, Share and Compile Code Snippets

In a previous post, I wrote about Bonetree’s Codebox, a very nice web interface to share syntax highlighted snippets.

Codepad is a similar tool, with more features: You can compile your code and save it permanently. It also has a plugin for vim, which allows you to save/run your code in codepad right from vim.

Codepad supports a few languages, like C, C++, PHP, Python and others. There are many languages it does not support though.

› Continue reading

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to Ping.fm Post to Reddit Post to StumbleUpon

Tags: , ,

Saturday, March 7th, 2009 Collaboration 1 Comment
my email
Already a member?
Login
Login using Facebook:
Last visitors
my photo
Hi,
My name is Amir Watad. I have a BSc. in biomedical engineering from The Biomedical Engineering school , Technion , Israel, and am currently studying for a BSc. in electrical engineering at The Electrical Engineering school , Technion , Israel.
I work at the verification dept. in Mellanox Technologies Ltd.
I love Linux, the Command Line and the OpenSource Community.
I used to write Poems (Arabic) when I was able to find time for this.
March 2010
S M T W T F S
« Jan    
 123456
78910111213
14151617181920
21222324252627
28293031  
Opensource Logo
SEO Powered by Platinum SEO from Techblissonline

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.