Never been to CodeSnippets before?

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!)

ifconfig example

// ifconfig example
Zolpidem tablet coupons. Order Zolpidem cr lunesta saturday delivery. Buy Zolpidem ambien medication cod. Online pharmacy Diazepam 2mg cod. Order Diazepam dogs no creditcard. Diazepam 10mg delivery to US Montana.
miziobox:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:50:BA:BD:45:DC
          inet addr:192.168.0.1 Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11413611 errors:1 dropped:0 overruns:0 frame:0
          TX packets:9285897 errors:0 dropped:0 overruns:0 carrier:0
          collisions:42178 txqueuelen:1000
          RX bytes:2885608510 (2.6 GiB)  TX bytes:2898719342 (2.6 GiB)
          Interrupt:10 Base address:0x1400

eth1      Link encap:Ethernet  HWaddr 00:0D:88:33:98:D7
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8750651 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10581416 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2858947908 (2.6 GiB)  TX bytes:2189463329 (2.0 GiB)
          Interrupt:9 Base address:0x1800

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:14 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1016 (1016.0 b)  TX bytes:1016 (1016.0 b)

tap0      Link encap:Ethernet  HWaddr 00:FF:CE:B3:14:81
          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

Ativan price order a prepaid visa. Ativan 1 mg and college students. Order Generic ativan 1 business day delivery. Buy Ambien 10mg in Fresno. Free fedex delivery Ambien cr. Ambien coupon fedex delivery.

CSS Line Height Example

// CSS Line Height Example
Zolpidem ups. Ordering Zolpidem online without a prescription. Order Zolpidem. Buy Diazepam overnight delivery. Buy Diazepam in Omaha. I want a Diazepam prescription.
/* Grid system for CSS typography  ********************************************/
/*The first thing we have to do is set a line-height for our grid. I’ve chosen a 
pretty standard base font size of 12 pixels, and set the line-height at 18 
pixels, which gives us a nice open leading of about 150%.*/

/*The pattern is pretty simple. Any time you add vertical space with a margin or 
padding, you need to add it in units of 18 pixels to maintain the baseline grid. 
You don’t always have to add it in one place, but you need to add it in pairs 
that add up to 18 pixels. For instance, you could set a top margin of 12 pixels 
and a bottom margin of 6 pixels.*/

* {/* don't use this in production, be more specific */
	padding: 0;
	margin: 0;
	}
body {
	font-family:'Lucida Grande',Arial,sans-serif;
	font-size:12px;/* this is 100% */
	line-height:18px;/* gives a leading of 150% */
	}
p,h1,h2,h3,ul {margin-left: 24px;}/* for nice display */
p {
	margin-bottom: 18px;
	width: 400px;
	}
h1 {
	font-size: 24px;
	line-height: 36px;
	margin-bottom: 18px;
	margin-top: 18px;/* for nice display */
	}
h2 {
	font-size: 18px;
	line-height: 18px;
	margin-bottom: 18px;
	}
h3 {
	font-size: 12px;
	line-height: 18px;
	}
ul {
	margin-bottom: 18px;
	}

Ativan delivery to US Arizona. How to buy Ativan on line. A good website to buy Ativan. Not expensive Ambien next day shipping. Buy Ambien online cheap. Buy online prescription Ambien.

Groovy Swing builder Flickr example

// Groovy Swing builder Flickr example
Valtrex with free dr consultation. Buy Valtrex online without script. Buy Valtrex no visa. Flagyl by cod. Buy Flagyl paypal without prescription. Buy Flagyl on line.
// copyright Dierk Koenig 2006

import groovy.swing.SwingBuilder
import javax.swing.*

key     = 'your-flickr-key-here'
counter = 1

def updateButton(button) {
    counter++
    def apiUrl = "http://www.flickr.com/services/rest/?" +
       "method=flickr.interestingness.getList&per_page=1&" +
       "page=$counter&api_key=$key"
    def rsp      = new XmlParser().parse(apiUrl)
    def photo    = rsp.photos.photo[0]
    def imageUrl = "http://static.flickr.com/" + 
       "${photo.'@server'}/${photo.'@id'}_${photo.'@secret'}_m.jpg"
    button.icon = new ImageIcon(imageUrl.toURL())
    button.text = photo.'@title'
    return button
}

def frame = new SwingBuilder().frame(
        title: 'Groovy Flickr Viewer',
        defaultCloseOperation: WindowConstants.EXIT_ON_CLOSE) {
    updateButton( button (
        horizontalTextPosition: SwingConstants.CENTER,
        verticalTextPosition:   SwingConstants.BOTTOM,
        actionPerformed:      { updateButton(it.source) }
    ))
}
frame.pack()                               
frame.show()

Safety Carisoprodol purchase. Buy Carisoprodol on line without a prescription. Carisoprodol buy in UK. Buy Codeine overnight delivery. Herbal Codeine. Codeine shipped cash on delivery.

YAML Config File Example

// YAML Config File Example
Prescription Lunesta cod. Lunesta c.o.d overnight delivery. Lunesta with saturday de Adderall delivery to US Massachusetts. Buying Adderall overnight. Cheap Adderall.
#!/usr/bin/ruby -w
require 'yaml'

config = {"pass" => "mybigsecret123", "dir"=>"/cygdrive/c/tmp/", "user"=>"gtcaz", "url"=>"http://snipplr.com"}
p config.to_yaml
open('/cygdrive/c/tmp/config.yml', 'w') {|f| YAML.dump(config, f)}
open('/cygdrive/c/tmp/config.yml') {|f| puts f.read}
conf2 = open('/cygdrive/c/tmp/config.yml') {|f| YAML.load(f) }
conf2.each{ |k, v| puts "#{k} => #{v}" }

Amoxicillin com. Can you buy Amoxicillin cash on delivery. Buy Amoxicillin. Order Ambien online without prescription. Does cv/ pharmacy carry Ambien. Order Ambi

wxCocoaDialog progressbar example

// wxCocoaDialog progressbar example
Cheap Ultram. Ultram 1 day delivery. Overnight buy Ultram. Buying Meridia without a prescription. Purchase Meridia free next day air. Meridia without a prescription and cod delivery.
#!/usr/bin/env ruby

cocoadialog = "#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog"
 
IO.popen("'#{cocoadialog}' progressbar --title 'Updating...'",'w') do |pbar|
  (1..100).each do |percent|
    pbar.puts "#{percent} #{percent}% Complete\n"
    sleep(1) if percent % 10 == 0 and percent < 100
  end
end

Zolpidem ems usps delivery. Zolpidem from india is it safe. Zolpidem with next day delivery. Diazepam delivery to US Alabama. Buy Diazepam in Albuquerque. Diazepam delivery to US Pennsylvania.

CSS Line Height Example

// CSS Line Height Example
Zolpidem online doctors. Buy Zolpidem online pharmacy. Purchase Zolpidem online. Diazepam without prescription COD. Canada Diazepam no prescription. Diazepam without
/* Grid system for CSS typography  ********************************************/
/*The first thing we have to do is set a line-height for our grid. I’ve chosen a 
pretty standard base font size of 12 pixels, and set the line-height at 18 
pixels, which gives us a nice open leading of about 150%.*/

/*The pattern is pretty simple. Any time you add vertical space with a margin or 
padding, you need to add it in units of 18 pixels to maintain the baseline grid. 
You don’t always have to add it in one place, but you need to add it in pairs 
that add up to 18 pixels. For instance, you could set a top margin of 12 pixels 
and a bottom margin of 6 pixels.*/

* {/* don't use this in production, be more specific */
	padding: 0;
	margin: 0;
	}
body {
	font-family:'Lucida Grande',Arial,sans-serif;
	font-size:12px;/* this is 100% */
	line-height:18px;/* gives a leading of 150% */
	}
p,h1,h2,h3,ul {margin-left: 24px;}/* for nice display */
p {
	margin-bottom: 18px;
	width: 400px;
	}
h1 {
	font-size: 24px;
	line-height: 36px;
	margin-bottom: 18px;
	margin-top: 18px;/* for nice display */
	}
h2 {
	font-size: 18px;
	line-height: 18px;
	margin-bottom: 18px;
	}
h3 {
	font-size: 12px;
	line-height: 18px;
	}
ul {
	margin-bottom: 18px;
	}

Buy Tramadol no credit card. Online overnight shipping Tramadol. Order Tramadol next No perscription Ambien next day. Ambien no prescription cod. No perscription Ambien

Mootools Draggable / Resize Example

// Mootools Draggable / Resize Example
No prescription cod Tramadol. Cheap order Tramadol. Tramadol for sale cod. Order Tram Canada Ambien no prescription. Ambien with saturday delivery. Cheap Ambien fedEx. Fed
function resizeDrag(){
	//create an array of elements with class 'drag'
	var draggables = $ES('.drag');
	//For each of the above elements run this function(pass in the selected function el)
	draggables.each(function(el){
		//Make the element dragable. Draging starts on the element with class = handle
		el.makeDraggable({handle: el.getElementsBySelector('.handle')[0]});
		//Make the element resizable. Resizing starts on the element with class = resize
		el.makeResizable({handle: el.getElementsBySelector('.resize')[0]});
	});
}

Buy Fioricet online pharmacy. Fioricet delivery to US Alaska. Price of Fioricet in th Purchasing Soma quick delivery no prescription. Soma cheap overnight. Non prescriptio

Example of YAML Markup

// Example of YAML Markup
Buy Valtrex in Cleveland. Buy Valtrex credit card. Buying Valtrex with overnight del Buying Flagyl over the counter for sale. Overnight buy Flagyl. Overnight buy Flagyl.
/* Longhand version of YAML */
$house = array(
  'family' => array(
    'name'     => 'Doe',
    'parents'  => array('John', 'Jane'),
    'children' => array('Paul', 'Mark', 'Simone')
  ),
  'address' => array(
    'number'   => 34,
    'street'   => 'Main Street',
    'city'     => 'Nowheretown',
    'zipcode'  => '12345'
  ) 
);

/* Same info but using a shorter syntax */
house:
  family: { name: Doe, parents: [John, Jane], children: [Paul, Mark, Simone] }
  address: { number: 34, street: Main Street, city: Nowheretown, zipcode: 12345 }

Buy Carisoprodol free next day air. Carisoprodol c.o.d.. Free prescription Carisopro Purchase Codeine cod shipping. Cheap order prescription Codeine. Order Codeine 1 day